.vimrc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. "not VI compatible
  2. set nocompatible
  3. "set the path where the plugins live
  4. "in this case in the folder .vim in home
  5. set packpath+=~/.vim
  6. "needed for language server integration
  7. set runtimepath+=~/.vim-plugins/LanguageClient-neovim
  8. "turn off the taskbar in gvim
  9. set guioptions-=m
  10. "a bit more readable
  11. set guifont=Lucida_Console:h10
  12. "make backspace behave normally in insert mode
  13. set backspace=indent,eol,start
  14. "highlight search
  15. set hlsearch
  16. "search while entering the search query
  17. set incsearch
  18. "show me the options to autocomplete while in command mode
  19. set wildmenu
  20. "autocomplete stuff by giving me the match up to the first differing character
  21. "then tab through the options
  22. set wildmode=longest:list,full
  23. "NO, I don't want ANSI.
  24. set fileencodings=utf-8
  25. set encoding=utf-8
  26. set fileencoding=utf-8
  27. "turn on syntax highlighting and indentation
  28. syntax on
  29. filetype indent plugin on
  30. "colorscheme zellner
  31. colorscheme gentooish "available in the void-package vim-colorschemes
  32. "colorscheme holokai "available in the void-package vim-colorschemes
  33. "for indentating html - otherwise these tags are not recognized
  34. let g:html_indent_inctags = "html,body,head,tbody,table,td,tr,th,canvas"
  35. "whitespace
  36. set tabstop=4
  37. set shiftwidth=4
  38. set list
  39. set listchars=tab:>~,trail:~,extends:>,precedes:<
  40. "don't wrap - duh. - maybe I should change this, it seems actually quite
  41. "practical for keeping the right width for readability.
  42. set nowrap
  43. set textwidth=0
  44. set wrapmargin=0
  45. "line numbers
  46. set nu
  47. set rnu
  48. "send all backups to home/vimbackups
  49. set backupdir=~/.vim/backups,.
  50. set directory=~/.vim/swapfiles,.
  51. " Persistent undo
  52. set undodir=~/.vim/undofiles,.
  53. set undofile
  54. "search and replace options ignore case, except if there's something uppercase
  55. "in it
  56. set ignorecase
  57. set smartcase
  58. "set the current working directory when entering a new file
  59. autocmd BufEnter * silent! :lcd%:p:h
  60. "remove all trailing whitespace on lines with non-whitespace characters
  61. " autocmd BufEnter * silent! :call <SID>StripTrailingWhitespaces()
  62. "____________MAPPINGS______________
  63. "
  64. "disable the fucking F1 key
  65. nmap <F1> <nop>
  66. "remap leader to space
  67. nnoremap <SPACE> <nop>
  68. let mapleader = " "
  69. "insert line-break
  70. nnoremap <leader><CR> o<esc>
  71. "move screen
  72. nnoremap <C-h> 4zh
  73. nnoremap <C-l> 4zl
  74. nnoremap <C-j> 4<C-E>
  75. nnoremap <C-k> 4<C-Y>
  76. "getting the next match of f or t, but more logically - at least on a german
  77. "keyboard
  78. nnoremap ; ,
  79. nnoremap , ;
  80. "removes the highlighting after search
  81. "until I can fix the escape codes sent by the terminal, I'll have to press esc
  82. "twice
  83. nnoremap <silent> <esc><esc> :noh<CR>
  84. " nnoremap <silent> <esc> :noh<CR>
  85. "autocommands for povray files
  86. augroup pov
  87. autocmd!
  88. au BufWritePost *.pov !povray .
  89. augroup END
  90. augroup tsv
  91. autocmd!
  92. au BufReadPost *.tsv set tabstop=20
  93. augroup END
  94. "autocommands for the twig templating language
  95. augroup twig
  96. autocmd!
  97. au BufReadPost *.twig set ft=html
  98. augroup END