.vimrc 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. "for indentating html - otherwise these tags are not recognized
  32. let g:html_indent_inctags = "html,body,head,tbody,table,td,tr,th,canvas"
  33. "whitespace
  34. set tabstop=4
  35. set shiftwidth=4
  36. set list
  37. set listchars=tab:>~,trail:~,extends:>,precedes:<
  38. "don't wrap - duh. - maybe I should change this, it seems actually quite
  39. "practical for keeping the right width for readability.
  40. set nowrap
  41. set textwidth=0
  42. set wrapmargin=0
  43. "line numbers
  44. set nu
  45. set rnu
  46. "send all backups to home/vimbackups
  47. set backupdir=~/.vim/backups,.
  48. set directory=~/.vim/swapfiles,.
  49. " Persistent undo
  50. set undodir=~/.vim/undofiles,.
  51. set undofile
  52. "search and replace options ignore case, except if there's something uppercase
  53. "in it
  54. set ignorecase
  55. set smartcase
  56. "set the current working directory when entering a new file
  57. autocmd BufEnter * silent! :lcd%:p:h
  58. "remove all trailing whitespace on lines with non-whitespace characters
  59. " autocmd BufEnter * silent! :call <SID>StripTrailingWhitespaces()
  60. "____________MAPPINGS______________
  61. "
  62. "disable the fucking F1 key
  63. nmap <F1> <nop>
  64. "remap leader to space
  65. nnoremap <SPACE> <nop>
  66. let mapleader = " "
  67. "move screen
  68. nnoremap <C-h> 4zh
  69. nnoremap <C-l> 4zl
  70. nnoremap <C-j> 4<C-E>
  71. nnoremap <C-k> 4<C-Y>
  72. "getting the next match of f or t, but more logically - at least on a german
  73. "keyboard
  74. nnoremap ; ,
  75. nnoremap , ;
  76. "removes the highlighting after search
  77. "until I can fix the escape codes sent by the terminal, I'll have to press esc
  78. "twice
  79. nnoremap <silent> <esc><esc> :noh<CR>
  80. " nnoremap <silent> <esc> :noh<CR>
  81. "f5 triggers a povray render when in a .pov file
  82. autocmd FileType pov nnoremap <F5> :!povray .<CR>:redraw!<CR>