Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

gfixler's tiny .vimrc

By: a guest on Oct 23rd, 2011  |  syntax: VIM  |  size: 0.98 KB  |  views: 130  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. :set nowrap ts=4 sw=4 smartindent expandtab
  2. :set magic "very magic"
  3. :syntax on
  4. filetype plugin indent on
  5.  
  6. let mapleader = ","
  7.  
  8. " make Y work as C and D do
  9. nmap Y y$
  10.  
  11. " make j and k play well on wrapped lines
  12. nmap j gj
  13. nmap k gk
  14.  
  15. " simplify tab and buffer switching
  16. nmap <C-p> <Esc>:tabp
  17. nmap <C-n> <Esc>:tabn
  18. map <left> :bp
  19. map <right> :bn
  20.  
  21. " Python comment/uncomment
  22. map <Leader>3 :s/^/#/:noh
  23. map <Leader># :s/^#//:noh
  24.  
  25. " highlight searches
  26. set hlsearch
  27.  
  28. " simplify interactions with .vimrc
  29. nmap <Leader>v :vs $MYVIMRC
  30. nmap <Leader>V :source $MYVIMRC
  31.  
  32. set foldmethod=marker
  33. :hi Folded term=standout ctermfg=4 ctermbg=8
  34.  
  35. " sets up/maps command to tell what group in the syntax file char under cursor belongs to
  36. autocmd FuncUndefined * exe 'runtime autoload/'.expand('<afile>').'.vim'
  37. map -a  :call SyntaxAttr()<CR>
  38.  
  39. " allow up/down arrows to accordion through vertical splits (like Qt's QToolBox)
  40. set winminheight=0
  41. map <up> <c-w>k<c-w>_
  42. map <down> <c-w>j<c-w>_
  43.  
  44.