Created
March 26, 2010 23:21
-
-
Save 13k/345519 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" CSS 1-line comment helpers | |
" | |
" Comments the current line | |
fun CssComment() | |
:s@^\(\s*\)\(.*\)$@\1/*\2*/@ | |
endfun | |
" Un-comment from current line | |
fun CssUncomment() | |
:s@^\(\s*\)/\*\(.*\)\*/$@\1\2@ | |
endfun | |
" Toggles between comment and un-comment | |
fun ToggleCssComment() | |
if (match(getline("."), "\s*/\\*.*\\*/") > -1) | |
call CssUncomment() | |
else | |
call CssComment() | |
end | |
endfun |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment