About: Clojure Tips   Sponge Permalink

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

The comment leader for Clojure is the ; character. This snippet allows easy commenting and uncommenting of lines. map . :call ClojureCommentUncomment() function! ClojureCommentUncomment() let search_saved = @/ if getline('.') =~ '^;' s/^;// " remove ';' at beginning of line else s/^/;/ " insert ';' at beginning of line endif let @/ = search_saved endfunction

AttributesValues
rdfs:label
  • Clojure Tips
rdfs:comment
  • The comment leader for Clojure is the ; character. This snippet allows easy commenting and uncommenting of lines. map . :call ClojureCommentUncomment() function! ClojureCommentUncomment() let search_saved = @/ if getline('.') =~ '^;' s/^;// " remove ';' at beginning of line else s/^/;/ " insert ';' at beginning of line endif let @/ = search_saved endfunction
Version
  • 7(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 1630(xsd:integer)
Subpage
  • /200909
Complexity
  • basic
Created
  • 2009(xsd:integer)
ID
  • 1631(xsd:integer)
NEXT
  • 1632(xsd:integer)
abstract
  • The comment leader for Clojure is the ; character. This snippet allows easy commenting and uncommenting of lines. map . :call ClojureCommentUncomment() function! ClojureCommentUncomment() let search_saved = @/ if getline('.') =~ '^;' s/^;// " remove ';' at beginning of line else s/^/;/ " insert ';' at beginning of line endif let @/ = search_saved endfunction Typing \. (assuming the default backslash leader) will remove ; from the beginning of the current line if it is present (uncomment), or will insert it otherwise (comment). You could make this more restrictive by only adding the mapping for files of the Clojure filetype, or by adding it to ~/.vim/after/ftplugin/clojure.vim.
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