Advertisement
Guest User

yeeters_vimrc

a guest
Jan 4th, 2020
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 1.45 KB | None | 0 0
  1. " SPACE AND TABS
  2. syntax enable           " enable syntax processing
  3. set tabstop=4           " number of visual spaces per TAB
  4. set softtabstop=4       " number of spaces in the tab when editing
  5. set expandtab           " tabs are spaces
  6.  
  7. " UI CONFIG
  8. set number              " show line numbers
  9. set showcmd             " show command in bottom bar
  10. set cursorline          " highlight current line
  11. filetype indent on      " load filetype-specific indent files
  12. set wildmenu            " visual autocomplete for command menu
  13. set lazyredraw          " redraw only when we need to
  14. set showmatch           " highlight matching [{()}]
  15.  
  16. " SEARCHING
  17. set incsearch           " search as characters are entered
  18. set hlsearch            " highlight matches
  19.  
  20. " turn off search highlight
  21. nnoremap <leader><space> :nohlsearch<CR>
  22.  
  23. " FOLDING
  24. set foldenable          " enable folding
  25. set foldlevelstart=10   " open most folds by default
  26. set foldnestmax=10      " 10 nested fold max
  27.  
  28. " space open/closes folds
  29. nnoremap <space> za
  30.  
  31. set foldmethod=indent   " fold based on indent level
  32.  
  33. " MOVEMENT
  34.  
  35. " move vertically by visual line
  36. nnoremap j gj
  37. nnoremap k gk
  38.  
  39. " move to beginning/end of line
  40. nnoremap B ^
  41. nnoremap E $
  42.  
  43. " $/^ doesn't do anything
  44. nnoremap $ <nop>
  45. nnoremap & <nop>
  46.  
  47. " highlight last inserted text
  48. nnoremap gV `[v`]
  49.  
  50. " disable 'smart' indent
  51. " setlocal indentkeys-=:
  52.  
  53. " LEADER SHORTCUTS
  54. " CONTINUE: https://dougblack.io/words/a-good-vimrc.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement