Advertisement
GraftedPaintBag

Vim config

Jun 19th, 2018
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 3.53 KB | None | 0 0
  1. --- .vimrc ---
  2. runtime! archlinux.vim
  3.  
  4. source plugin.vim
  5. source vundle.vim
  6.  
  7. source keybindings.vim
  8. source general.vim
  9.  
  10. --- vundle.vim ---
  11. filetype off
  12. set rtp+=~/.vim/bundle/Vundle.vim
  13. call vundle#rc()
  14. "Plugin 'VundleVim/Vundle.vim'
  15. Plugin 'Valloric/YouCompleteMe'
  16. Plugin 'scrooloose/nerdtree'
  17. Plugin 'rhysd/vim-clang-format'
  18. Plugin 'vim-scripts/DoxygenToolkit.vim'
  19. Plugin 'tpope/vim-fugitive'
  20. Plugin 'Chiel92/vim-autoformat'
  21. Plugin 'vim-syntastic/syntastic'
  22. "Plugin 'powerline/powerline'
  23.  
  24. Plugin 'vim-airline/vim-airline'
  25. Plugin 'vim-airline/vim-airline-themes'
  26. Plugin 'lervag/vimtex'
  27.  
  28. filetype plugin indent on
  29. syntax on
  30.  
  31.  
  32. --- keybindings.vim ---
  33. nore h h
  34. nore s l
  35. nore t k
  36. nore n j
  37.  
  38. nore d d
  39. nore l n
  40. nore L N
  41. nore - $
  42. nore _ ^
  43. "Window movement keys
  44. nore H <C-W>h
  45. nore T <C-W>k
  46. nore N <C-W>j
  47. nore S <C-W>l
  48. nore Y <C-W>t
  49.  
  50. "linecommand
  51. no gn gj
  52. no gt gk
  53.  
  54. no C :ClangFormat<CR>
  55.  
  56. "nnoremap j :Project<CR>
  57. "nnoremap <Tab> :e #<CR>
  58. nnoremap <Tab> :NERDTreeToggle<CR>
  59.  
  60. "declaration
  61. nnoremap cd :YcmCompleter GoToDeclaration<CR>
  62. "implementation
  63. nnoremap ci :YcmCompleter GoToDefinition<CR>
  64. "header
  65. nnoremap ch :YcmCompleter GoToInclude<CR>
  66. "goto
  67. nnoremap cg :YcmCompleter GoTo<CR>
  68. "references
  69. nnoremap cr :YcmCompleter GoToReferences<CR>
  70. "type
  71. nnoremap ct :YcmCompleter GetType<CR>
  72. "fixit
  73. nnoremap cf :YcmCompleter FixIt<CR>
  74. "explanation
  75. nnoremap ce :YcmCompleter GetDoc<CR>
  76.  
  77. nore cj :Dox<CR>
  78. nore cc :Autoformat<CR>
  79. nore cl :SyntasticCheck<CR>
  80.  
  81. command Sudow w !sudo tee % >/dev/null
  82. command WritingPrompt vsplit <bar> vsplit <bar> vertical resize 120 <bar> enew <bar> wincmd w <bar> wincmd w <bar> enew <bar> vertical resize 120 <bar> wincmd h <bar> set spell <bar> set wrap linebreak
  83. "command SetupVimProject vsplit <bar> split <bar> wincmd l <bar> split <bar> NERDTreeToggle
  84. command SetupVimProject vsplit <bar> NERDTreeToggle
  85.  
  86. --- plugin.vim ---
  87. let g:airline_theme='durant'
  88.  
  89. let g:ycm_confirm_extra_conf = 0
  90. let g:ycm_always_populate_location_list = 1
  91.  
  92. let NERDTreeMapOpenInTab = 'y'
  93. let NERDTreeMapOpenInTabSilent = 'Y'
  94.  
  95. let g:vimtex_compiler_enabled = 1
  96. let g:vimtex_complete_enabled = 0
  97. let g:vimtex_fold_enabled = 0
  98. let g:vimtex_format_enabled = 0
  99. let g:vimtex_imaps_enabled = 0
  100. let g:vimtex_indent_bib_enabled = 0
  101. let g:vimtex_indent_enabled = 0
  102. let g:vimtex_labels_enabled = 0
  103. let g:vimtex_mappings_enabled = 0
  104. let g:vimtex_matchparen_enabled = 0
  105. let g:vimtex_motion_enabled = 0
  106. let g:vimtex_text_obj_enabled = 0
  107. let g:vimtex_toc_enabled = 0
  108. let g:vimtex_view_enabled = 1
  109.  
  110. let g:DoxygenToolkit_commentType = 'C++'
  111.  
  112. "let g:syntastic_check_on_wq = 0
  113. "let g:syntastic_check_on_open = 0
  114. let g:syntastic_auto_loc_list = 1
  115. let g:syntastic_mode_map = { 'mode': 'passive', 'active_filetypes': ['javascript'],'passive_filetypes': [] }
  116. let g:syntastic_javascript_checkers = ['eslint']
  117.  
  118. --- general.vim ---
  119. set incsearch
  120. set hlsearch
  121.  
  122. set ignorecase
  123. set smartcase
  124. set foldmethod=syntax
  125.  
  126. set relativenumber
  127.  
  128. set dictionary=/usr/share/dict/usa
  129. " set dictionary+=/usr/share/dict/german
  130.  
  131. set complete+=k
  132.  
  133. set t_Co=256
  134.  
  135. set smartindent
  136. set tabstop=2
  137. set softtabstop=2
  138. set expandtab
  139. set shiftwidth=2
  140.  
  141. set nocompatible
  142.  
  143. set laststatus=2
  144.  
  145. colorscheme basic-dark
  146. autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
  147.  
  148. "Alert when hitting the end of the line
  149. "au BufWinEnter *.cpp,*.hpp let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1)
  150. "au BufWinEnter *.cpp,*.hpp set foldmethod=syntax
  151.  
  152. syntax enable
  153. filetype plugin on
  154. set path+=**
  155.  
  156. set wildmenu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement