Guest User

Untitled

a guest
Sep 4th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 1.86 KB | None | 0 0
  1. set syntax=on          " Syntax highlighting
  2. set ts=4               " Tab size = 4 spaces
  3. set number             " Line numbers
  4. set showcmd            " Show (partial) command in status line.
  5. set ignorecase         " Do case insensitive matching
  6. set hlsearch           " Highlight search terms
  7. set smartcase          " Do smart case matching
  8. set incsearch          " Incremental search
  9. set autowrite          " Automatically save before commands like :next and :make
  10. set background=dark    " Dark background
  11. set autoindent         " Auto indenting
  12. set autoread           " Update open files when changed externally
  13. set sw=4               " Set shiftwidth to 4 spaces(default tab size)
  14. "set foldcolumn=1       " Increase the width of the number line column
  15. "filetype plugin indent on
  16.  
  17. " Make the line numbers a different color
  18. hi LineNr ctermfg=lightblue
  19.  
  20. " Toggle line numbers for easy copying
  21. nnoremap <F2> :set number!<CR>
  22. " Clear highlighted searches
  23. nmap <silent> ,/ :nohlsearch<CR>
  24. " this saves 2 keystrokes on nearly every command
  25. nnoremap ; :
  26.  
  27. " Auto corrects and such
  28. abbr teh the
  29. " Create a color column at 79 characters
  30. if exists('+colorcolumn')
  31.     set colorcolumn=72,79
  32.     hi ColorColumn ctermbg=cyan guibg=yellow
  33. else
  34.     au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>79v.\+', -1)
  35. endif
  36.  
  37. " Highlight text that goes over the 80 column limit
  38. "highlight OverLength ctermbg=darkred ctermfg=white
  39. "match OverLength /\&81v.\+/
  40.  
  41. " indicate which line the cursor is on
  42. "set cursorline
  43.  
  44. " Folding will be applied according to the syntax file
  45. "set foldmethod=syntax
  46.  
  47. " Disable arrow keys
  48. nnoremap <up> <nop>
  49. nnoremap <down> <nop>
  50. nnoremap <left> <nop>
  51. nnoremap <right> <nop>
  52. inoremap <up> <nop>
  53. inoremap <down> <nop>
  54. inoremap <left> <nop>
  55. inoremap <right> <nop>
  56.  
  57. " Easy window navigation
  58. map <C-h> <C-w>h
  59. map <C-j> <C-w>j
  60. map <C-k> <C-w>k
  61. map <C-l> <C-w>l
Add Comment
Please, Sign In to add comment