Advertisement
sp1d3o

vimrc

Oct 22nd, 2021
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.14 KB | None | 0 0
  1. "number at start of each line
  2. set number
  3.  
  4. "search highlighting
  5. set hlsearch
  6.  
  7. "deletes highlights
  8. nnoremap <silent> <C-l> :nohl<CR><C-l>
  9.  
  10. " size of a hard tabstop
  11. set tabstop=2
  12.  
  13. "size of an indent
  14. set shiftwidth=2
  15.  
  16. "smart tabs
  17. set smarttab
  18.  
  19. "use spaces instead of tab
  20. set expandtab
  21.  
  22. "do not indent by spaces in makefile
  23. autocmd Filetype make set noexpandtab
  24.  
  25. "auto pair {
  26. "inoremap { {<CR>}<Esc>ko
  27.  
  28. "alt+w save
  29. :nmap <a-w> :w<CR>
  30. :imap <a-w> <Esc>:w<CR>i
  31.  
  32. "alt+q quit'n'save
  33. :nmap <a-q> :wq<CR>
  34. :imap <a-q> <Esc>:wq<CR>
  35.  
  36. "ctrl+d quit
  37. :nmap <c-d> :q!<CR>
  38. :imap <c-d> <Esc>:q!<CR>
  39.  
  40. "alt mapping workaround
  41. let c='a'
  42. while c <= 'z'
  43.   exec "set <A-".c.">=\e".c
  44.   exec "imap \e".c." <A-".c.">"
  45.   let c = nr2char(1+char2nr(c))
  46. endw
  47.  
  48. "hide numbers
  49. :nmap <F12> :set invnumber<CR>
  50.  
  51. set timeout ttimeoutlen=1
  52.  
  53. set tags=./tags
  54.  
  55. set background=dark
  56. set t_Co=256
  57.  
  58. if &term =~ '^screen'
  59.    " tmux will send xterm-style keys when xterm-keys is on
  60.     execute "set <xUp>=\e[1;*A"
  61.     execute "set <xDown>=\e[1;*B"
  62.     execute "set <xRight>=\e[1;*C"
  63.     execute "set <xLeft>=\e[1;*D"
  64. endif
  65.  
  66. syntax on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement