About: Brackets and parentheses in Perl   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

Basically, I set it up so that when you're in perl and have a non keyword charcter, (except for @, $ and % for perl) and you type a { you get: { | <- cursor } Whereas, when I have a keyword I get: word{} With the cursor in the middle, for hashes in perl. I can jump out of any block, except the "..." or '...' blocks, by typing their closing character. So } jumps me out past the next } in the file. Warning, this search may wrap around. Finally, I made it so that, using the alt key,

AttributesValues
rdfs:label
  • Brackets and parentheses in Perl
rdfs:comment
  • Basically, I set it up so that when you're in perl and have a non keyword charcter, (except for @, $ and % for perl) and you type a { you get: { | <- cursor } Whereas, when I have a keyword I get: word{} With the cursor in the middle, for hashes in perl. I can jump out of any block, except the "..." or '...' blocks, by typing their closing character. So } jumps me out past the next } in the file. Warning, this search may wrap around. Finally, I made it so that, using the alt key,
Version
  • 5(xsd:double)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 317(xsd:integer)
Category
  • Brackets
Author
  • Abitkin
Complexity
  • intermediate
Created
  • 2002-08-22(xsd:date)
ID
  • 318(xsd:integer)
NEXT
  • 319(xsd:integer)
Rating
  • 9(xsd:integer)
abstract
  • Basically, I set it up so that when you're in perl and have a non keyword charcter, (except for @, $ and % for perl) and you type a { you get: { | <- cursor } Whereas, when I have a keyword I get: word{} With the cursor in the middle, for hashes in perl. I can jump out of any block, except the "..." or '...' blocks, by typing their closing character. So } jumps me out past the next } in the file. Warning, this search may wrap around. Finally, I made it so that, using the alt key, * inserts a ' * inserts a " * inserts a [ * inserts a ] * inserts a { * inserts a } * inserts a < * inserts a > " File - matchMe.vim " Date - Wednesday, August 21, 2002 " This code fixes my problem with " does the one format for perl and acts correctly with " hashes function! InsertBrackets() let fileType = &ft if fileType == 'perl' let col = col('.') - 1 if !col || getline('.')[col - 1] !~ '\k' && getline('.')[col - 1] !~ '\$' && getline('.')[col - 1] !~ '@' && getline('.')[col - 1] !~ '%' && getline('.')[col - 1] !~ '#' return "{\\}\ko" else return "{}\i\:echo \" endif else return "{\\}\ko" endif endfunction " This code jumps out of the brackets function! JumpNext(startChar, endChar) let ret1 = "\:echo searchpair('".a:startChar."','','".a:endChar."','W','synIDattr(synID(line(\".\"), col(\".\"), 0), \"name\") =~? \"string\"')\i\" return ret1 endfunction " mappings inoremap " ""i:echo inoremap ' ''i:echo inoremap < <>i:echo inoremap ( ()i:echo inoremap [ []i:echo inoremap { =InsertBrackets () inoremap > =JumpNext("<",">") inoremap ) =JumpNext("(",")") inoremap ] =JumpNext("[","]") inoremap } =JumpNext("{","}") inoremap [ inoremap ] inoremap " inoremap { inoremap } inoremap < inoremap > inoremap ( inoremap ) inoremap '
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software