|
@@ -19,10 +19,6 @@ let &statusline = s:statusline_expr()
|
|
|
|
|
|
" Use a line cursor within insert mode and a block cursor everywhere else.
|
|
|
"
|
|
|
-" Using iTerm2? Go-to preferences / profile / colors and disable the smart bar
|
|
|
-" cursor color. Then pick a cursor and highlight color that matches your theme.
|
|
|
-" That will ensure your cursor is always visible within insert mode.
|
|
|
-"
|
|
|
" Reference chart of values:
|
|
|
" Ps = 0 -> blinking block.
|
|
|
" Ps = 1 -> blinking block (default).
|
|
@@ -82,8 +78,8 @@ set spelllang=en_us
|
|
|
set splitbelow
|
|
|
set splitright
|
|
|
set tabstop=2
|
|
|
-
|
|
|
-color desert
|
|
|
+set history=1000
|
|
|
+set updatetime=500
|
|
|
|
|
|
" WSL yank support
|
|
|
" Ref: https://superuser.com/questions/1291425/windows-subsystem-linux-make-vim-use-the-clipboard
|
|
@@ -95,33 +91,13 @@ if executable(s:clip)
|
|
|
augroup END
|
|
|
endif
|
|
|
|
|
|
-" Plug-vim
|
|
|
+" --[ Plug-vim
|
|
|
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
|
|
if empty(glob(data_dir . '/autoload/plug.vim'))
|
|
|
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
|
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
|
endif
|
|
|
|
|
|
-" Start NERDTree and put the cursor back in the other window.
|
|
|
-"autocmd VimEnter * NERDTree | wincmd p
|
|
|
-
|
|
|
-" Start NERDTree. If a file is specified, move the cursor to its window.
|
|
|
-autocmd StdinReadPre * let s:std_in=1
|
|
|
-autocmd VimEnter * NERDTree | if argc() > 0 || exists("s:std_in") | wincmd p | endif
|
|
|
-
|
|
|
-" Exit Vim if NERDTree is the only window remaining in the only tab.
|
|
|
-autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
|
|
|
-
|
|
|
-" Show hidden files by default with NERDTree
|
|
|
-let NERDTreeShowHidden=1
|
|
|
-
|
|
|
-" Set airline theme
|
|
|
-" let g:airline_theme='cobalt2'
|
|
|
-let g:airline_theme='molokai'
|
|
|
-
|
|
|
-" Map NERDTree mapping
|
|
|
-nnoremap <leader>n :NERDTreeFocus<CR>
|
|
|
-nnoremap <C-n> :NERDTree<CR>
|
|
|
|
|
|
call plug#begin()
|
|
|
" Syntastic is a syntax checking plugin for Vim
|
|
@@ -135,10 +111,12 @@ Plug 'vim-airline/vim-airline-themes'
|
|
|
Plug 'https://github.com/godlygeek/tabular'
|
|
|
" Go plug in
|
|
|
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
|
|
+" Go plug in
|
|
|
+" Plug 'govim/govim'
|
|
|
" If you've ever tried using the . command after a plugin map
|
|
|
Plug 'tpope/vim-repeat'
|
|
|
" EasyClip is a plugin for Vim which contains a collection of clipboard related functionality
|
|
|
-"Plug 'svermeulen/vim-easyclip'
|
|
|
+" Plug 'svermeulen/vim-easyclip'
|
|
|
" Powerline for vim
|
|
|
Plug 'powerline/powerline'
|
|
|
" Terraform
|
|
@@ -151,7 +129,98 @@ Plug 'ervandew/supertab'
|
|
|
Plug 'mzlogin/vim-markdown-toc'
|
|
|
" Nerdtree
|
|
|
Plug 'preservim/nerdtree'
|
|
|
+" Theme Iceberg
|
|
|
+Plug 'cocopon/iceberg.vim'
|
|
|
+" Theme Nord
|
|
|
+Plug 'arcticicestudio/nord-vim'
|
|
|
+" Theme Solarized8
|
|
|
+Plug 'lifepillar/vim-solarized8'
|
|
|
+" Them Hybrid
|
|
|
+Plug 'w0ng/vim-hybrid'
|
|
|
+" NERDTree plugin that highlights all visible nodes
|
|
|
+" Plug 'PhilRunninger/nerdtree-buffer-ops'
|
|
|
+" Buffergator is a plugin for listing, navigating between buffers
|
|
|
+Plug 'jeetsukumaran/vim-buffergator'
|
|
|
+" A plugin of NERDTree showing git status flags
|
|
|
+Plug 'Xuyuanp/nerdtree-git-plugin'
|
|
|
+" Git diff display tools
|
|
|
+Plug 'airblade/vim-gitgutter'
|
|
|
+" Conventional git message
|
|
|
+Plug 'jmauro/vim-conventional-commits'
|
|
|
call plug#end()
|
|
|
|
|
|
-" Integrate Powerline fonts
|
|
|
+" --[ NERDTree
|
|
|
+" Start NERDTree. If a file is specified, move the cursor to its window.
|
|
|
+autocmd StdinReadPre * let s:std_in=1
|
|
|
+autocmd VimEnter * NERDTree | if argc() > 0 || exists("s:std_in") | wincmd p | endif
|
|
|
+
|
|
|
+" Exit Vim if NERDTree is the only window remaining in the only tab.
|
|
|
+autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
|
|
|
+
|
|
|
+" Show hidden files by default with NERDTree
|
|
|
+let NERDTreeShowHidden=1
|
|
|
+let g:NERDTreeWinSize = 35
|
|
|
+" Map NERDTree mapping
|
|
|
+nnoremap <leader>n :NERDTreeFocus<CR>
|
|
|
+nnoremap <C-n> :NERDTree<CR>
|
|
|
+
|
|
|
+" --[ Airline
|
|
|
+" let g:airline_theme='cobalt2'
|
|
|
+let g:airline_theme='molokai'
|
|
|
+
|
|
|
+
|
|
|
+let g:buffergator_viewport_split_policy = "B"
|
|
|
+
|
|
|
+" --[ Solarized Theme
|
|
|
+set background=dark
|
|
|
+colorscheme solarized8
|
|
|
+
|
|
|
+" --[ Powerline
|
|
|
let g:airline_powerline_fonts = 1
|
|
|
+
|
|
|
+" --[ Syntastic
|
|
|
+" Display configuration
|
|
|
+let g:syntastic_always_populate_loc_list = 1
|
|
|
+let g:syntastic_auto_loc_list = 1
|
|
|
+let g:syntastic_check_on_open = 1
|
|
|
+let g:syntastic_check_on_wq = 0
|
|
|
+" Language checker
|
|
|
+"let g:syntastic_go_checkers = ['golangci-lint', 'gofmt']
|
|
|
+"let g:syntastic_go_golangci_lint_args = ['run']
|
|
|
+let g:syntastic_yaml_checkers = [ "yamllint" ]
|
|
|
+" let g:syntastic_terraform_checkers = ['terragrunt']
|
|
|
+" let g:syntastic_terraform_terragrunt_lint_args = ['hclfmt']
|
|
|
+
|
|
|
+" --[ gitgutter
|
|
|
+let g:gitgutter_preview_win_floating = 1
|
|
|
+
|
|
|
+" --[ Terraform
|
|
|
+let g:hcl_align = 1
|
|
|
+let g:terraform_align = 1
|
|
|
+let g:terraform_fmt_on_save = 1
|
|
|
+
|
|
|
+" --[ Shortcut remap
|
|
|
+" Autoformat F12
|
|
|
+map <F12> gg=C<C-o><C-o>
|
|
|
+
|
|
|
+let g:go_auto_sameids = 1
|
|
|
+let g:go_highlight_array_whitespace_error = 1
|
|
|
+let g:go_highlight_chan_whitespace_error = 1
|
|
|
+let g:go_highlight_extra_types = 1
|
|
|
+let g:go_highlight_space_tab_error = 1
|
|
|
+let g:go_highlight_trailing_whitespace_error = 0
|
|
|
+let g:go_highlight_operators = 1
|
|
|
+let g:go_highlight_functions = 1
|
|
|
+let g:go_highlight_function_parameters = 1
|
|
|
+let g:go_highlight_function_calls = 1
|
|
|
+let g:go_highlight_types = 1
|
|
|
+let g:go_highlight_fields = 1
|
|
|
+let g:go_highlight_build_constraints = 1
|
|
|
+let g:go_highlight_generate_tags = 1
|
|
|
+let g:go_highlight_string_spellcheck = 1
|
|
|
+let g:go_highlight_format_strings = 1
|
|
|
+let g:go_highlight_variable_declarations = 1
|
|
|
+let g:go_highlight_variable_assignments = 1
|
|
|
+let g:go_fmt_experimental = 1
|
|
|
+let g:go_metalinter_autosave=1
|
|
|
+let g:go_metalinter_autosave_enabled=['golint', 'govet']
|