diff options
author | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2014-12-18 15:53:48 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2014-12-18 15:59:24 +0100 |
commit | ed09312c511018d26c9dd7bd03c6e9b62fb2708a (patch) | |
tree | 4ddaf011cf41e6c354ccb7029da0643893dd8be2 | |
parent | b8ae592ddfe32b79e39c7dbfa55021e61ac8d276 (diff) |
[map] comments/uncomments C code blocks/lines
-rw-r--r-- | vimrc | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -253,8 +253,16 @@ set tabstop=4 set shiftwidth=4 set noexpandtab -noremap U yyp:s/[^ ]/-/g<CR>:noh<CR> -noremap Y yyp:s/[^ ]/=/g<CR>:noh<CR> +"noremap U yyp:s/[^ ]/-/g<CR>:noh<CR> +"noremap Y yyp:s/[^ ]/=/g<CR>:noh<CR> + +" Code comment/uncomment + noremap <silent> // m"I// <ESC>g`"3l + noremap <silent> /* m"I/* <ESC>A */<ESC>jg`"3l + xmap <silent> // /* +xnoremap <silent> /* <ESC>`>a */<ESC>`<i/* <ESC> + noremap <silent> \* m"e?/\* *<CR>:s:/\* *::<CR>/ *\*\/<CR>:s: *\*/::\|:nohl<CR>jg`"3h + noremap <silent> \\ m"0:s:// *::\|:nohl<CR>g`"3h " Reformatting is done using 'gq<motion>' noremap <ESC>Q :s/^/> /<CR> |