Advertisement
Guest User

Untitled

a guest
Sep 4th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 5.00 KB | None | 0 0
  1. " Tony's Settings
  2. " Usage:
  3. " Download and install nvim, then install 'dein' the vim-package manager.
  4. " During installation of dein it will output a sample configuration, take the
  5. " two lines that `set runtimepath=PATH` and `dein#begin(PATH)` and replace the
  6. " ones in this file online 14 and 17. Restart nvim and Happy Vimming!
  7.  
  8. "dein Scripts-----------------------------
  9. if &compatible
  10.   set nocompatible               " Be iMproved
  11. endif
  12.  
  13. " Required:
  14. set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim
  15.  
  16. " Required:
  17. call dein#begin('~/.config/nvim/')
  18.  
  19. " Let dein manage dein
  20. " Required:
  21. call dein#add('Shougo/dein.vim')
  22.  
  23. " Add or remove your plugins here:
  24. call dein#add('Shougo/neosnippet.vim')
  25. call dein#add('Shougo/neosnippet-snippets')
  26.  
  27. " Functional utils
  28. call dein#add('tpope/vim-fugitive')
  29. "call dein#add('wbthomason/buildit.nvim') "as a replacement for neomake?
  30.  
  31. " Look'n'feel
  32. call dein#add('Shougo/vimshell')
  33. call dein#add('scrooloose/nerdtree')
  34. call dein#add('airblade/vim-gitgutter')
  35. call dein#add('ctrlpvim/ctrlp.vim')
  36. call dein#add('itchyny/lightline.vim')
  37. call dein#add('mhinz/vim-startify')
  38. call dein#add('morhetz/gruvbox')
  39. call dein#add('joshdick/onedark.vim')
  40. call dein#add('equalsraf/neovim-gui-shim')
  41. call dein#add('majutsushi/tagbar')
  42. "call dein#add('arakashic/chromatica.nvim')
  43. "call dein#remove('arakashic/chromatica.nvim')
  44. call dein#add('ap/vim-buftabline')
  45.  
  46. " Lang support
  47. call dein#add('kchmck/vim-coffee-script')
  48. call dein#add('fatih/vim-go') " Need to run :GoInstallBinaries after install
  49. call dein#add('quabug/vim-gdscript')
  50. call dein#add('vim-scripts/openscad.vim')
  51.  
  52. call dein#add('w0rp/ale')
  53. call dein#add('ntpeters/vim-better-whitespace')
  54.  
  55. " Deoplete (autocomplete) & other shitty IDE-like behaviour
  56. call dein#add('Shougo/deoplete.nvim')
  57. call dein#add('Shougo/neoinclude.vim')
  58. call dein#add('Shougo/context_filetype.vim')
  59. call dein#add('zchee/deoplete-clang')
  60. call dein#add('zchee/deoplete-go')
  61. call dein#add('fishbullet/deoplete-ruby')
  62. call dein#add('chiel92/vim-autoformat')
  63.  
  64. " Required:
  65. call dein#end()
  66.  
  67. " Required:
  68. filetype plugin indent on
  69. syntax enable
  70.  
  71. " If you want to install not installed plugins on startup.
  72. if dein#check_install()
  73.   call dein#install()
  74. endif
  75.  
  76. "End dein Scripts-------------------------
  77.  
  78. " Configure deoplete and subcandidates
  79. let g:deoplete#enable_at_startup = 1
  80. let g:deoplete#enable_smart_case = 1
  81. let g:deoplete#sources#clang#libclang_path="/usr/lib/llvm-6.0/lib/libclang.so"
  82. let g:deoplete#sources#clang#clang_header="/usr/include/clang"
  83. " Let auto-complete take effect on TAB key
  84. inoremap <silent><expr> <TAB>
  85.     \ pumvisible() ? "\<C-n>" :
  86.     \ <SID>check_back_space() ? "\<TAB>" :
  87.     \ deoplete#mappings#manual_complete()
  88.     function! s:check_back_space() abort "{{{
  89.     let col = col('.') - 1
  90.     return !col || getline('.')[col - 1]  =~ '\s'
  91.     endfunction"}}}
  92. " Close any automatically opened scratch-buffers
  93. " once completion popup the is closed
  94. autocmd CompleteDone * pclose
  95.  
  96.  
  97. " Chromatica setup.
  98. let g:chromatica#libclang_path='/usr/lib/llvm-6.0/lib/libclang.so'
  99. let g:chromatica#enable_at_startup=0
  100.  
  101. " Lightline config
  102. let g:lightline = {
  103.     \ 'active': {
  104.     \   'left': [ [ 'mode', 'paste' ],
  105.     \             [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
  106.     \ },
  107.     \ 'component_function': {
  108.     \   'gitbranch': 'fugitive#head'
  109.     \ },
  110.     \ }
  111. " Bind exuberant ctags window to F8
  112. nmap <F8> :TagbarToggle<CR>
  113.  
  114. " Alias ä to Leader
  115. " map ä <leader>
  116. map <C-n> :NERDTreeToggle<CR>
  117. " Alias Ctrl+ö as ESC
  118. imap <C-ö> <ESC>
  119. map <C-ö> <ESC>
  120. " Rebind Command-P to Ctrl-L
  121. "map <C-l> <C-p>
  122. "imap <C-l> <ESC><C-p>
  123. " Ctrl+S save behaviour
  124. nmap <C-s> :w<CR>
  125. imap <C-s> <ESC>:w<CR>
  126.  
  127. " Kill window plugin
  128. "nmap <C-W>c <Plug>Kwbd
  129. nmap <C-W>c :bdel<CR>
  130. " Configure tabs to be 4-spaces
  131. set expandtab
  132. set shiftwidth=4
  133. set softtabstop=4
  134. set nowrap
  135.  
  136. " Terminal break to normal remap to ESC
  137. tnoremap <Esc> <C-\><C-n>
  138.  
  139. inoremap <C-e> <Esc>A
  140. inoremap <C-a> <Esc>I
  141.  
  142.  
  143.  
  144. "colorscheme gruvbox
  145. set background=dark
  146. colorscheme onedark
  147.  
  148. " Lightline displays the mode status so we can disable the standard built in
  149. " indicator.
  150. set noshowmode
  151. let g:lightline.colorscheme =  'one'
  152. " Activate line-numbers eveywhere
  153. set number
  154. set numberwidth=3
  155.  
  156. " Ctrl-C/V behaviour
  157. map <C-c> "+y<CR>
  158. nmap <C-v> "+p<CR>
  159. imap <C-v> <ESC>"+p<CR>i
  160.  
  161. " Tab navigation like Firefox.
  162. "nnoremap <C-S-tab> :tabprevious<CR>
  163. "nnoremap <C-tab>   :tabnext<CR>
  164. nnoremap <C-t>     :tabnew<CR>
  165. " Using ctrl tab for buffer switching instead
  166. nnoremap <C-S-tab> :bprevious<CR>
  167. nnoremap <C-tab>   :bnext<CR>
  168.  
  169. au BufReadPost *.vue set syntax=html
  170. au FileType go set shiftwidth=8
  171. au FileType go set softtabstop=8
  172.  
  173. set colorcolumn=80
  174. " vim-autoformat configuration
  175. " enable Autoformat on write
  176. au BufWrite * :Autoformat
  177. " disable stupid autofromat when in doubt
  178. let g:autoformat_autoindent = 0
  179. let g:autoformat_retab = 0
  180. let g:autoformat_remove_trailing_spaces = 0
  181.  
  182. let g:strip_whitespace_on_save=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement