Guest User

Untitled

a guest
Oct 19th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. filetype on
  2.  
  3. augroup vimrc_filetype
  4. autocmd!
  5. autocmd FileType ruby call s:RubyCommenter()
  6. autocmd FileType vim call s:VimCommenter()
  7. augroup end
  8.  
  9. map _ :s/^\/\/\\|^--\\|^> \\|^[#"%!;]//<CR>:nohlsearch<CR>
  10.  
  11. function! s:VimCommenter()
  12. map - :s/^/\"/<CR>:nohlsearch<CR>
  13. endfunction
  14.  
  15. function! s:RubyCommenter()
  16. map - :s/^/#/<CR>:nohlsearch<CR>
  17. endfunction
Add Comment
Please, Sign In to add comment