Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.72 KB | None | 0 0
  1. set nocompatible " be iMproved, required
  2.  
  3. " set the runtime path to include Vundle and initialize
  4. set rtp+=~/.vim/bundle/Vundle.vim
  5. filetype off
  6. call vundle#begin()
  7. " alternatively, pass a path where Vundle should install plugins
  8. "call vundle#begin('~/some/path/here')
  9.  
  10.  
  11. Plugin 'gmarik/Vundle.vim'
  12. Plugin 'nsf/gocode', {'rtp': 'vim/'}
  13. Plugin 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
  14. Plugin 'scrooloose/nerdtree'
  15. Plugin 'Xuyuanp/nerdtree-git-plugin'
  16. Plugin 'ctrlpvim/ctrlp.vim'
  17. Plugin 'dyng/ctrlsf.vim'
  18. Plugin 'tpope/vim-fugitive'
  19. Plugin 'ryanoasis/vim-devicons'
  20. Plugin 'sebdah/vim-delve'
  21. Plugin 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
  22. Plugin 'zchee/deoplete-go', { 'do': 'make'}
  23. Plugin 'flazz/vim-colorschemes'
  24. Bundle 'jistr/vim-nerdtree-tabs'
  25.  
  26. " All of your Plugins must be added before the following line
  27. call vundle#end() " required
  28. filetype plugin indent on " required
  29. " To ignore plugin indent changes, instead use:
  30. "filetype plugin on
  31. "
  32. " Brief help
  33. " :PluginList - lists configured plugins
  34. " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
  35. " :PluginSearch foo - searches for foo; append `!` to refresh local cache
  36. " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
  37. let g:deoplete#enable_at_startup = 1
  38.  
  39. set number
  40. set relativenumber
  41. set clipboard=unnamedplus
  42. set tabstop=4
  43. set softtabstop=4
  44. set shiftwidth=4
  45.  
  46.  
  47. "colors
  48. colorscheme gruvbox
  49. set background=dark
  50. let g:gruvbox_contrast_dark = "hard"
  51.  
  52. filetype plugin on
  53. syntax on
  54.  
  55. "enabling script which closing brackets and quotes by default and ignoring
  56. "pressing closing bracket or quote if cursor is under closing bracket or quote
  57. let g:brackets = 1
  58. let g:braces = 1
  59. let g:double_quotes = 1
  60. let g:single_quotes = 1
  61. let g:square_brackets = 1
  62. source $HOME/.vim/syntax/brackets.vim
  63. source $HOME/.vim/syntax/quotes.vim
  64.  
  65.  
  66. "bindings
  67. noremap <F2> :NERDTreeFocusToggle<CR>
  68. noremap <F3> :NERDTreeTabsToggle<CR>
  69. map <C-S-f> <ESC>:CtrlSF
  70. tnoremap <Esc> <C-\><C-n>
  71. noremap <A-t> :below 15sp term://zsh <CR>i
  72. tnoremap <A-h> <C-\><C-N><C-w>h
  73. tnoremap <A-j> <C-\><C-N><C-w>j
  74. tnoremap <A-k> <C-\><C-N><C-w>k
  75. tnoremap <A-l> <C-\><C-N><C-w>l
  76. inoremap <A-h> <C-\><C-N><C-w>h
  77. inoremap <A-j> <C-\><C-N><C-w>j
  78. inoremap <A-k> <C-\><C-N><C-w>k
  79. inoremap <A-l> <C-\><C-N><C-w>l
  80. nnoremap <A-h> <C-w>h
  81. nnoremap <A-j> <C-w>j
  82. nnoremap <A-k> <C-w>k
  83. nnoremap <A-l> <C-w>l
  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.  
  93.  
  94. "Go highligting
  95. let g:go_auto_type_info = 1
  96. let g:go_highlight_extra_types = 1
  97. let g:go_highlight_types = 1
  98. let g:go_highlight_functions = 1
  99. let g:go_highlight_function_arguments = 1
  100. let g:go_highlight_function_calls = 1
  101.  
  102. "statusline
  103. set statusline=
  104. set statusline+=%#PrimaryBlock#
  105. set statusline+=%#SecondaryBlock#
  106. set statusline+=%{MyGitBranch()}
  107. set statusline+=%#Blanks#
  108. set statusline+=\ %t\
  109. set statusline+=%(%m%)
  110. set statusline+=%=
  111. set statusline+=%#SecondaryBlock#
  112. set statusline+=\ Ln
  113. set statusline+=\ %l
  114. set statusline+=,Col
  115. set statusline+=\ %c\
  116. set statusline+=%#PrimaryBlock#
  117. set statusline+=\ %Y\
  118.  
  119. function! MyGitBranch()
  120. return winwidth(0) > 30 && fugitive#head() != '' ? (' ' . fugitive#head()) : ''
  121. endfunction
  122.  
  123. function! MyFiletype()
  124. return winwidth(0) > 30 ? (strlen(&filetype) ? WebDevIconsGetFileTypeSymbol() : '?') : ''
  125. endfunction
  126.  
  127. function! MyFileformat()
  128. return winwidth(0) > 30 ? (WebDevIconsGetFileFormatSymbol()) : ''
  129. endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement