.vimrc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. "lets vim search for files to open recursively
  7. "for use with the find command
  8. set path+=**
  9. "Yeah, don't search through node_modules
  10. set wildignore+=**/node_modules/**
  11. "turn off the taskbar in gvim
  12. set guioptions-=m
  13. "a bit more readable
  14. set guifont=Lucida_Console:h10
  15. "make backspace behave normally in insert mode
  16. set backspace=indent,eol,start
  17. "highlight search
  18. set hlsearch
  19. "search while entering the search query
  20. set incsearch
  21. "show me the options to autocomplete while in command mode
  22. set wildmenu
  23. "autocomplete stuff by giving me the match up to the first differing character
  24. "then tab through the options
  25. set wildmode=longest:list,full
  26. "put new windows to the right/below
  27. set splitright
  28. set splitbelow
  29. "NO, I don't want ANSI.
  30. set fileencodings=utf-8
  31. set encoding=utf-8
  32. set fileencoding=utf-8
  33. "turn on syntax highlighting and indentation
  34. syntax on
  35. filetype indent plugin on
  36. "Akin to intellisense
  37. "I should set this up to work with <C-N>
  38. filetype plugin on
  39. set omnifunc=syntaxcomplete#Complete
  40. "colorscheme zellner
  41. colorscheme gentooish "available in the void-package vim-colorschemes
  42. "colorscheme holokai "available in the void-package vim-colorschemes
  43. "always underline spelling errors instead of making their background red
  44. hi clear SpellBad
  45. hi SpellBad cterm=underline ctermfg=red
  46. "for indentating html - otherwise these tags are not recognized
  47. let g:html_indent_inctags = "html,body,head,tbody,table,td,tr,th,canvas"
  48. "whitespace
  49. set tabstop=4
  50. set shiftwidth=4
  51. set list
  52. set listchars=tab:>~,trail:~,extends:>,precedes:<
  53. "don't wrap - duh. - maybe I should change this, it seems actually quite
  54. "practical for keeping the right width for readability.
  55. set nowrap
  56. set textwidth=0
  57. set wrapmargin=0
  58. "line numbers
  59. set nu
  60. set rnu
  61. "send all backups to home/vimbackups
  62. set backupdir=~/.vim/backups,.
  63. set directory=~/.vim/swapfiles,.
  64. " Persistent undo
  65. set undodir=~/.vim/undofiles,.
  66. set undofile
  67. "search and replace options ignore case, except if there's something uppercase
  68. "in it
  69. set ignorecase
  70. set smartcase
  71. "remove all trailing whitespace on lines with non-whitespace characters
  72. " autocmd BufEnter * silent! :call <SID>StripTrailingWhitespaces()
  73. "____________MAPPINGS______________
  74. "
  75. "disable the fucking F1 key
  76. nmap <F1> <nop>
  77. "remap leader to space
  78. nnoremap <SPACE> <nop>
  79. let mapleader = " "
  80. "insert line-break
  81. nnoremap <leader><CR> o<esc>
  82. "move screen
  83. nnoremap <C-h> 4zh
  84. nnoremap <C-l> 4zl
  85. nnoremap <C-j> 4<C-E>
  86. nnoremap <C-k> 4<C-Y>
  87. "getting the next match of f or t, but more logically - at least on a german
  88. "keyboard
  89. nnoremap ; ,
  90. nnoremap , ;
  91. "removes the highlighting after search
  92. "until I can fix the escape codes sent by the terminal, I'll have to press esc
  93. "twice
  94. nnoremap <silent> <esc><esc> :noh<CR>
  95. " nnoremap <silent> <esc> :noh<CR>
  96. "add custom/unknown filetypes
  97. autocmd BufNewFile,BufRead *.plan set filetype=plan
  98. autocmd BufNewFile,BufRead *.tsv set filetype=tsv