colin's auto-commenter: implement vim comments
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 15 Feb 2010 21:57:56 +0000 (13:57 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 15 Feb 2010 21:57:56 +0000 (13:57 -0800)
colin's auto-commenter: implement vim comments.
Also spruce up the comment removal stuff a bit.

.vimrc

diff --git a/.vimrc b/.vimrc
index 5b879b0..a08a22f 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -47,6 +47,8 @@ set laststatus=2
 
 "*************** colin's auto-commenter *************** 
 map ,/ :s/^/\/\//<CR>:nohlsearch<CR>
-map ,,/ :s/\/\///<CR>:nohlsearch<CR>
+map ,,/ :s/^\/\///<CR>:nohlsearch<CR>
 map ,# :s/^/#/<CR>:nohlsearch<CR>
-map ,,# :s/#//<CR>:nohlsearch<CR>
+map ,,# :s/^#//<CR>:nohlsearch<CR>
+map ," :s/^/\"/<CR>:nohlsearch<CR>
+map ,," :s/^\"//<CR>:nohlsearch<CR>