daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Oct 19th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top