init.vim 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. """""""""" HOUSEKEEPING """"""""""
  2. syntax on
  3. set nowrap
  4. set encoding=utf8
  5. set mouse=a
  6. " escape can blow me
  7. nnoremap <C-c> <Esc>
  8. " Gets rid of highlights after search
  9. nnoremap <silent> <F7> :nohlsearch<CR><F7>
  10. " Line numbers
  11. set number
  12. " Toggle line numbers
  13. nnoremap <F6> :set nonumber!<CR>
  14. nnoremap <F9> :vsplit<CR>
  15. nnoremap <F10> :split<CR>
  16. nnoremap <F12> :only<CR>
  17. "if (has("termguicolors"))
  18. " set termguicolors
  19. "endif
  20. if &compatible
  21. set nocompatible " Be iMproved
  22. endif
  23. " Remap window switch
  24. nnoremap <C-h> <C-w>h
  25. nnoremap <C-j> <C-w>j
  26. nnoremap <C-k> <C-w>k
  27. nnoremap <C-l> <C-w>l
  28. " Remap terminal switch
  29. tnoremap <C-[> <C-\><C-n>
  30. tnoremap <C-c><Esc> <Esc>
  31. tnoremap <C-h> <C-\><C-n><C-w>h
  32. tnoremap <C-j> <C-\><C-n><C-w>j
  33. tnoremap <C-k> <C-\><C-n><C-w>k
  34. tnoremap <C-l> <C-\><C-n><C-w>l
  35. " <TAB>: completion.
  36. inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
  37. " Enable Elite mode, No ARRRROWWS!!!!
  38. let g:elite_mode=1
  39. " Disable arrow movement, resize splits instead.
  40. if get(g:, 'elite_mode')
  41. nnoremap <Up> :resize -2<CR>
  42. nnoremap <Down> :resize +2<CR>
  43. nnoremap <Left> :vertical resize -2<CR>
  44. nnoremap <Right> :vertical resize +2<CR>
  45. endif
  46. """""""""" END HOUSEKEEPING """"""""""
  47. """""""""" PLUGINS """"""""""
  48. " Required:
  49. set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim
  50. " Required:
  51. if dein#load_state('~/chris/.cache/dein')
  52. call dein#begin('~/.cache/dein')
  53. " Let dein manage dein
  54. " Required:
  55. call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim')
  56. " Start Screen
  57. call dein#add('mhinz/vim-startify')
  58. " Search Index shows how many instances of searched term
  59. call dein#add('google/vim-searchindex')
  60. " line indents
  61. "call dein#add('Yggdroot/indentLine')
  62. " Gutentags
  63. call dein#add('ludovicchabant/vim-gutentags')
  64. " Tagbar
  65. call dein#add('majutsushi/tagbar')
  66. " Add or remove your plugins here: TODO
  67. call dein#add('Shougo/neosnippet.vim')
  68. call dein#add('Shougo/neosnippet-snippets')
  69. " Themes
  70. call dein#add('liuchengxu/space-vim-dark')
  71. " Auto Pairs
  72. call dein#add('jiangmiao/auto-pairs')
  73. " NERDTree
  74. call dein#add('scrooloose/nerdtree')
  75. " BufOnly use :BufOnly to unload all or pass it a single buffer
  76. call dein#add('vim-scripts/BufOnly.vim')
  77. " For autocomplete
  78. call dein#add('Shougo/deoplete.nvim')
  79. " For vim 8+
  80. if !has('nvim')
  81. call dein#add('roxma/nvim-yarp')
  82. call dein#add('roxma/vim-hug-neovim-rpc')
  83. endif
  84. " You can specify revision/branch/tag.
  85. call dein#add('Shougo/deol.nvim', { 'rev': '01203d4c9' })
  86. " Required:
  87. call dein#end()
  88. call dein#save_state()
  89. endif
  90. " Required:
  91. filetype plugin indent on
  92. syntax enable
  93. " If you want to install not installed plugins on startup.
  94. if dein#check_install()
  95. call dein#install()
  96. endif
  97. """""""""" END PLUGINS """"""""""
  98. """""""""" SPACEVIM THEME """"""""""
  99. " Set theme
  100. colorscheme space-vim-dark
  101. " Terminal Transparency
  102. "if $TERM_PROGRAM =~ 'terminator'
  103. " hi Normal ctermbg=NONE guibg=NONE
  104. " hi LineNr ctermbg=NONE guibg=NONE
  105. " hi SignColumn ctermbg=NONE guibg=NONE
  106. "endif
  107. " Range: 233 (darkest) ~ 238 (lightest)
  108. " Default: 235
  109. let g:space_vim_dark_background = 233
  110. color space-vim-dark
  111. hi Comment guifg=#5C6370 ctermfg=59
  112. "hi Comment cterm=italic
  113. "set background=dark
  114. "set termguicolors
  115. " Enable highlighting of the current line
  116. set cursorline
  117. """""""""" END THEME """"""""""
  118. """""""""" BEGIN CONFIGS """"""""""
  119. " Deoplete
  120. let g:deoplete#enable_at_startup = 1
  121. " Startify
  122. let g:startify_custom_header = [
  123. \ ' ',
  124. \ ' __ ',
  125. \ ' __ __ /\_\ ___ ___ ',
  126. \ ' /\ \/\ \\/\ \ /'' __` __`\ ',
  127. \ ' \ \ \_/ |\ \ \/\ \/\ \/\ \ ',
  128. \ ' \ \___/ \ \_\ \_\ \_\ \_\ ',
  129. \ ' \/__/ \/_/\/_/\/_/\/_/ ',
  130. \ ]
  131. " Tagbar
  132. nmap <F8> :TagbarToggle<CR>
  133. " NERDTree
  134. nmap <F5> :NERDTreeToggle<CR>
  135. """""""""" END CONFIGS """"""""""
  136. "TODO figure out cscope