.vimrc 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. """""""""""""""""""""""""""""""""""""
  2. " Capella .vimrc
  3. """""""""""""""""""""""""""""""""""""
  4. set nocompatible " be iMproved, required
  5. filetype off " required
  6. " set the runtime path to include Vundle and initialize
  7. set rtp+=~/.vim/bundle/Vundle.vim
  8. call vundle#begin()
  9. " let Vundle manage Vundle, required
  10. Plugin 'VundleVim/Vundle.vim'
  11. " ------Plugins-------
  12. Plugin 'vim-airline/vim-airline'
  13. Plugin 'vim-airline/vim-airline-themes'
  14. Plugin 'scrooloose/nerdtree'
  15. Plugin 'tpope/vim-fugitive'
  16. Plugin 'kristijanhusak/vim-multiple-cursors'
  17. Plugin 'tpope/vim-surround'
  18. Plugin 'colors'
  19. Plugin 'jistr/vim-nerdtree-tabs'
  20. Plugin 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
  21. Plugin 'iwonbigbro/vim-hybrid'
  22. Plugin 'dense-analysis/ale'
  23. call vundle#end()
  24. filetype plugin indent on
  25. if has('syntax') && !exists('g:syntax_on')
  26. syntax enable
  27. endif
  28. """""""""""""""""""""""""""""""""""""
  29. " Configuration Section
  30. """""""""""""""""""""""""""""""""""""
  31. set laststatus=2
  32. set ruler
  33. set showcmd
  34. set wildmenu
  35. set autoread
  36. set backspace=indent,eol,start
  37. " Show linenumbers
  38. set number
  39. set noruler
  40. " Encoding
  41. set encoding=utf-8
  42. " Set Proper Tabs
  43. set tabstop=4
  44. set shiftwidth=4
  45. set smarttab
  46. set expandtab
  47. set listchars=tab:▒░,trail:▓
  48. set list
  49. " Search
  50. set hlsearch
  51. set incsearch
  52. " Theme and Styling
  53. set t_Co=256
  54. set background=dark
  55. " Vim-Airline Configuration
  56. let g:airline#extensions#tabline#enabled = 1
  57. let g:airline_theme='badwolf'
  58. let g:airline_powerline_fonts = 1
  59. set guifont=Source\ Code\ Pro\ for\ Powerline
  60. set t_Co=256
  61. let g:NERDTreeDirArrowExpandable = '▸'
  62. let g:NERDTreeDirArrowCollapsible = '▾'
  63. """""""""""""""""""""""""""""""""""""
  64. " Colors
  65. """""""""""""""""""""""""""""""""""""
  66. hi Normal ctermfg=252 ctermbg=none
  67. hi CursorLine ctermbg=236 cterm=none
  68. hi CursorLineNr ctermfg=208 cterm=none
  69. hi Boolean ctermfg=141
  70. hi Character ctermfg=222
  71. hi Number ctermfg=141
  72. hi String ctermfg=222
  73. hi Conditional ctermfg=197 cterm=bold
  74. hi Constant ctermfg=141 cterm=bold
  75. hi DiffDelete ctermfg=125 ctermbg=233
  76. hi Directory ctermfg=154 cterm=bold
  77. hi Error ctermfg=222 ctermbg=233
  78. hi Exception ctermfg=154 cterm=bold
  79. hi Float ctermfg=141
  80. hi Function ctermfg=154
  81. hi Identifier ctermfg=208
  82. hi Keyword ctermfg=197 cterm=bold
  83. hi Operator ctermfg=197
  84. hi PreCondit ctermfg=154 cterm=bold
  85. hi PreProc ctermfg=154
  86. hi Repeat ctermfg=197 cterm=bold
  87. hi Statement ctermfg=197 cterm=bold
  88. hi Tag ctermfg=197
  89. hi Title ctermfg=203
  90. hi Visual ctermbg=238
  91. hi Comment ctermfg=244
  92. hi LineNr ctermfg=239 ctermbg=235
  93. hi NonText ctermfg=239
  94. hi SpecialKey ctermfg=239
  95. colorscheme hybrid
  96. autocmd FileType nerdtree setlocal colorcolumn&
  97. highlight ColorColumn ctermbg=232 guibg=#2c2d27
  98. let &colorcolumn="".join(range(81,999),",")
  99. set splitright
  100. autocmd vimenter * NERDTree
  101. autocmd vimenter * wincmd p
  102. let g:NERDTreeDirArrows=0
  103. """""""""""""""""""""""""""""""""""""
  104. " Golang
  105. """""""""""""""""""""""""""""""""""""
  106. autocmd Filetype go command! -bang A call go#alternate#Switch(<bang>0, 'edit')
  107. autocmd Filetype go command! -bang AV call go#alternate#Switch(<bang>0, 'vsplit')
  108. autocmd Filetype go command! -bang AS call go#alternate#Switch(<bang>0, 'split')
  109. autocmd Filetype go command! -bang AT call go#alternate#Switch(<bang>0, 'tabe')
  110. map <C-l> :cnext<CR>
  111. map <C-k> :cprevious<CR>
  112. nnoremap <leader>a :cclose<CR>
  113. autocmd FileType go nmap <leader>b <Plug>(go-build)
  114. autocmd FileType go nmap <leader>r <Plug>(go-run)