About: Comment/UnComment visually selected text   Sponge Permalink

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

Add the following to your vimrc. It will add two menu items under the "Edit" menu in gVim. The function calls can be mapped to keystrokes if desired. "Menu items for Commenting and Un-Commenting code amenu 20.435 &Edit.-SEP4- : amenu Edit.Comment `:let ll=line("."):call Comment(fl, ll) amenu Edit.UnComment `:let ll=line("."):call UnComment(fl, ll) "Function for commenting a block of Visually selected text function Comment(fl, ll) let i=a:fl let comment="//" while i<=a:ll let cl=getline(i) let cl2=comment.cl call setline(i, cl2) let i=i+1 endwhile endfunction "Function for Un-Commenting a block of Visually selected text function UnComment(fl, ll) let i=a:fl let comment="//" while i<=a:ll let cl=getline(i) let cl2=substitute(cl, "//", "", "") call s

AttributesValues
rdfs:label
  • Comment/UnComment visually selected text
rdfs:comment
  • Add the following to your vimrc. It will add two menu items under the "Edit" menu in gVim. The function calls can be mapped to keystrokes if desired. "Menu items for Commenting and Un-Commenting code amenu 20.435 &Edit.-SEP4- : amenu Edit.Comment `<:let fl=line(".")`>:let ll=line("."):call Comment(fl, ll) amenu Edit.UnComment `<:let fl=line(".")`>:let ll=line("."):call UnComment(fl, ll) "Function for commenting a block of Visually selected text function Comment(fl, ll) let i=a:fl let comment="//" while i<=a:ll let cl=getline(i) let cl2=comment.cl call setline(i, cl2) let i=i+1 endwhile endfunction "Function for Un-Commenting a block of Visually selected text function UnComment(fl, ll) let i=a:fl let comment="//" while i<=a:ll let cl=getline(i) let cl2=substitute(cl, "//", "", "") call s
Version
  • 6(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 367(xsd:integer)
Category
  • Automated Text Insertion
Author
  • Amit Neogy
Complexity
  • intermediate
Created
  • 2002(xsd:integer)
ID
  • 369(xsd:integer)
NEXT
  • 371(xsd:integer)
Rating
  • 52(xsd:integer)
abstract
  • Add the following to your vimrc. It will add two menu items under the "Edit" menu in gVim. The function calls can be mapped to keystrokes if desired. "Menu items for Commenting and Un-Commenting code amenu 20.435 &Edit.-SEP4- : amenu Edit.Comment `<:let fl=line(".")`>:let ll=line("."):call Comment(fl, ll) amenu Edit.UnComment `<:let fl=line(".")`>:let ll=line("."):call UnComment(fl, ll) "Function for commenting a block of Visually selected text function Comment(fl, ll) let i=a:fl let comment="//" while i<=a:ll let cl=getline(i) let cl2=comment.cl call setline(i, cl2) let i=i+1 endwhile endfunction "Function for Un-Commenting a block of Visually selected text function UnComment(fl, ll) let i=a:fl let comment="//" while i<=a:ll let cl=getline(i) let cl2=substitute(cl, "//", "", "") call setline(i, cl2) let i=i+1 endwhile endfunction
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