init.vim 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. call plug#begin('~/.config/nvim/plugged')
  2. Plug 'bufkill.vim' " dont close the window when killing a buffer
  3. Plug 'airblade/vim-gitgutter' " display modified lines
  4. Plug 'kien/ctrlp.vim' " ctrl-p opens a fuzzy file opener
  5. "Plug 'scrooloose/syntastic' " syntax checking
  6. Plug 'neomake/neomake'
  7. Plug 'sjl/gundo.vim' " graphical undo tree
  8. Plug 'bling/vim-airline' " fancy status line
  9. Plug 'Lokaltog/vim-distinguished'
  10. Plug 'majutsushi/tagbar'
  11. Plug 'scrooloose/nerdtree'
  12. Plug 'wellle/targets.vim'
  13. "Plug 'http://git.vhdltool.com/vhdl-tool/syntastic-vhdl-tool.git'
  14. Plug 'SirVer/ultisnips'
  15. Plug 'honza/vim-snippets'
  16. Plug 'junegunn/vim-easy-align'
  17. Plug 'Yggdroot/indentLine'
  18. Plug 'tpope/vim-fugitive'
  19. call plug#end()
  20. syntax on " syntax highlighting
  21. map ; :
  22. set backspace=2 " nvim, by default, doesn't backspace over lines, fix this
  23. set tabstop=4 " a tab is 4 columns
  24. set shiftwidth=4 " the number of spaces inserted for TAB
  25. set expandtab " convert tabs to spaces
  26. set number " line numbers
  27. set incsearch " incremental search
  28. set ignorecase " ignore case when searching (see smartcase)
  29. set smartcase " do not ignore case if pattern has mixed case (see ignorecase)
  30. set hid " do not ask to save the current buffer when opening/switching to another buffer
  31. set scrolloff=3 " show at least 3 lines either side of the cursor
  32. set laststatus=2 " display a status line
  33. "CtrlP configuration
  34. let g:ctrlp_map = '<c-p>'
  35. let g:ctrlp_cmd = 'CtrlPMixed'
  36. nnoremap <c-b> :CtrlPBuffer<CR>
  37. "recommended Gundo configuration
  38. nnoremap <F5> :GundoToggle<CR>
  39. " Airline
  40. let g:airline#extensions#tabline#enabled=1
  41. " Color scheme settings
  42. set background=dark
  43. colorscheme distinguished
  44. let g:tagbar_type_vhdl = {
  45. \ 'ctagsbin': 'vhdl-tool',
  46. \ 'ctagsargs': 'ctags -o -',
  47. \ 'ctagstype': 'vhdl',
  48. \ 'kinds' : [
  49. \'d:prototypes',
  50. \'b:package bodies',
  51. \'e:entities',
  52. \'a:architectures',
  53. \'t:types',
  54. \'p:processes',
  55. \'f:functions',
  56. \'r:procedures',
  57. \'c:constants',
  58. \'T:subtypes',
  59. \'r:records',
  60. \'C:components',
  61. \'P:packages',
  62. \'l:locals',
  63. \'i:instantiations',
  64. \'s:signals',
  65. \'v:variables:1:0'
  66. \ ],
  67. \ 'sro' : '::',
  68. \ 'kind2scope' : {
  69. \ 'a' : 'architecture',
  70. \ 'b' : 'packagebody',
  71. \ 'P' : 'package',
  72. \ 'p' : 'process'
  73. \ },
  74. \ 'scope2kinds' : {
  75. \ 'architecture' : 'a',
  76. \ 'packagebody' : 'b',
  77. \ 'package' : 'P',
  78. \ 'process' : 'p'
  79. \ }
  80. \}
  81. " Recommended syntastic configuration
  82. "set statusline+=%#warningmsg#
  83. "set statusline+=%{SyntasticStatuslineFlag()}
  84. "set statusline+=%*
  85. "let g:syntastic_always_populate_loc_list = 1
  86. "let g:syntastic_auto_loc_list = 1
  87. "let g:syntastic_check_on_open = 1
  88. "let g:syntastic_check_on_wq = 0
  89. "
  90. "let g:syntastic_vhdl_checkers = ['vhdltool']
  91. set cscopequickfix=s+,c+,d+,i+,t+,e+
  92. let g:neomake_open_list = 2
  93. autocmd! BufWritePost,BufRead * Neomake
  94. let g:neomake_vhdl_vhdltool_maker = {
  95. \ 'exe': 'vhdl-tool',
  96. \ 'args': ['client', 'lint'],
  97. \ 'errorformat': '%f:%l:%c:%t:%m',
  98. \ }
  99. let g:neomake_vhdl_enabled_makers = ['vhdltool']
  100. hi search ctermbg=LightBlue
  101. " Start interactive EasyAlign in visual mode (e.g. vipga)
  102. xmap ga <Plug>(EasyAlign)
  103. " Start interactive EasyAlign for a motion/text object (e.g. gaip)
  104. nmap ga <Plug>(EasyAlign)
  105. let g:easy_align_delimiters = {
  106. \ ':': { 'pattern': ':', 'left_margin': 1, 'right_margin': 1, 'stick_to_left': 0 },
  107. \ }