Jacknoll

vimrc

Dec 8th, 2015
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 1.20 KB | None | 0 0
  1. set nocompatible
  2. syntax on
  3.  
  4. source ~/.plugin.vimrc
  5.  
  6. set tabstop=4
  7. set expandtab
  8. set autoindent
  9. set shiftwidth=4
  10. set ruler
  11. set number
  12. set backspace=indent,eol,start
  13. set visualbell
  14. set bg=dark
  15. set hlsearch
  16. set cursorline
  17. set nowrap
  18. set noswapfile
  19. set wildmode=longest,list,full
  20. set wildmenu
  21. set encoding=utf-8  " Required for YouCompleteMe
  22.  
  23. " Set backup, swap and undo directories
  24. "
  25. " set backupdir=~/.vim/backup//
  26. " set directory=~/.vim/swap//
  27. " set undodir=~/.vim/undo//
  28.  
  29. " Session options
  30. set ssop-=options    " do not store global and local values in a session
  31. set ssop-=folds      " do not store folds
  32.  
  33. " Save session
  34. nnoremap <C-s> :mks!
  35.  
  36. " Search for the selected visual block
  37. vnoremap // y/<C-R>"<CR>
  38. vnoremap *  y/<C-R>"<CR>
  39.  
  40. " Show ctag selection if multiple options
  41. nnoremap <C-]> g<C-]>
  42.  
  43. " Change vim tabs
  44. nnoremap <C-lt> :tabnext<CR>
  45. nnoremap <C-gt> :tabprevious<CR>
  46.  
  47. " Maximize tabs
  48. nnoremap <C-w>/ <C-w>\|<C-w>_
  49.  
  50. " Map F4 to switch between cpp and h file
  51. map <F4> :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp,<CR>
  52.  
  53. " Setting ctags and plugins for MARS development
  54. set tags=./tags;,tags;
  55.  
  56. " Setting vim path per session. Helps with finding files
  57. set path=$PWD/**
Advertisement