├── .gitmodules ├── README.md ├── c++_config.vim ├── coc-settings.json ├── coc.vim ├── golang.vim ├── install.sh ├── lisp_config.vim ├── markdown.vim ├── python_config.vim ├── rust.vim ├── ui.vim └── vimrc /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "pack/plugin/opt/MatchTagAlways"] 2 | path = pack/plugin/opt/MatchTagAlways 3 | url = https://github.com/Valloric/MatchTagAlways 4 | [submodule "pack/plugin/opt/auto-pairs"] 5 | path = pack/plugin/opt/auto-pairs 6 | url = https://github.com/jiangmiao/auto-pairs 7 | [submodule "pack/plugin/opt/nerdcommenter"] 8 | path = pack/plugin/opt/nerdcommenter 9 | url = https://github.com/scrooloose/nerdcommenter 10 | [submodule "pack/plugin/opt/rainbow_parentheses.vim"] 11 | path = pack/plugin/opt/rainbow_parentheses.vim 12 | url = https://github.com/kien/rainbow_parentheses.vim 13 | [submodule "pack/plugin/opt/supertab"] 14 | path = pack/plugin/opt/supertab 15 | url = https://github.com/ervandew/supertab 16 | [submodule "pack/plugin/opt/tlib_vim"] 17 | path = pack/plugin/opt/tlib_vim 18 | url = https://github.com/tomtom/tlib_vim 19 | [submodule "pack/plugin/opt/ultisnips"] 20 | path = pack/plugin/opt/ultisnips 21 | url = https://github.com/SirVer/ultisnips 22 | [submodule "pack/plugin/opt/vim-addon-mw-utils"] 23 | path = pack/plugin/opt/vim-addon-mw-utils 24 | url = https://github.com/MarcWeber/vim-addon-mw-utils 25 | [submodule "pack/plugin/opt/vim-airline"] 26 | path = pack/plugin/opt/vim-airline 27 | url = https://github.com/vim-airline/vim-airline 28 | [submodule "pack/plugin/opt/vim-airline-themes"] 29 | path = pack/plugin/opt/vim-airline-themes 30 | url = https://github.com/vim-airline/vim-airline-themes 31 | [submodule "pack/plugin/opt/vim-autoclose"] 32 | path = pack/plugin/opt/vim-autoclose 33 | url = https://github.com/Townk/vim-autoclose 34 | [submodule "pack/plugin/opt/vim-autoformat"] 35 | path = pack/plugin/opt/vim-autoformat 36 | url = https://github.com/Chiel92/vim-autoformat 37 | [submodule "pack/plugin/opt/vim-closetag"] 38 | path = pack/plugin/opt/vim-closetag 39 | url = https://github.com/alvan/vim-closetag 40 | [submodule "pack/plugin/opt/vim-easymotion"] 41 | path = pack/plugin/opt/vim-easymotion 42 | url = https://github.com/easymotion/vim-easymotion 43 | [submodule "pack/plugin/opt/vim-fugitive"] 44 | path = pack/plugin/opt/vim-fugitive 45 | url = https://github.com/tpope/vim-fugitive 46 | [submodule "pack/plugin/opt/vim-instant-markdown"] 47 | path = pack/plugin/opt/vim-instant-markdown 48 | url = https://github.com/suan/vim-instant-markdown 49 | [submodule "pack/plugin/opt/vim-markdown"] 50 | path = pack/plugin/opt/vim-markdown 51 | url = https://github.com/plasticboy/vim-markdown 52 | [submodule "pack/plugin/opt/vim-multiple-cursors"] 53 | path = pack/plugin/opt/vim-multiple-cursors 54 | url = https://github.com/terryma/vim-multiple-cursors 55 | [submodule "pack/plugin/opt/vim-snippets"] 56 | path = pack/plugin/opt/vim-snippets 57 | url = https://github.com/honza/vim-snippets.git 58 | [submodule "pack/plugin/opt/vim-surround"] 59 | path = pack/plugin/opt/vim-surround 60 | url = https://github.com/tpope/vim-surround 61 | [submodule "pack/plugin/opt/vimproc.vim"] 62 | path = pack/plugin/opt/vimproc.vim 63 | url = https://github.com/Shougo/vimproc.vim 64 | [submodule "pack/plugin/opt/vim-easy-align"] 65 | path = pack/plugin/opt/vim-easy-align 66 | url = https://github.com/junegunn/vim-easy-align 67 | [submodule "pack/plugin/opt/slimv"] 68 | path = pack/plugin/opt/slimv 69 | url = https://github.com/kovisoft/slimv 70 | [submodule "pack/plugin/opt/ale"] 71 | path = pack/plugin/opt/ale 72 | url = https://github.com/w0rp/ale 73 | [submodule "pack/plugin/opt/LeaderF"] 74 | path = pack/plugin/opt/LeaderF 75 | url = https://github.com/Yggdroot/LeaderF 76 | [submodule "pack/plugin/opt/vim-cpp-enhanced-highlight"] 77 | path = pack/plugin/opt/vim-cpp-enhanced-highlight 78 | url = https://github.com/octol/vim-cpp-enhanced-highlight.git 79 | [submodule "pack/plugin/opt/vim-go"] 80 | path = pack/plugin/opt/vim-go 81 | url = https://github.com/fatih/vim-go 82 | [submodule "pack/plugin/opt/colorizer"] 83 | path = pack/plugin/opt/colorizer 84 | url = https://github.com/lilydjwg/colorizer 85 | [submodule "pack/plugin/opt/vim-polyglot"] 86 | path = pack/plugin/opt/vim-polyglot 87 | url = https://github.com/sheerun/vim-polyglot 88 | [submodule "pack/plugin/opt/rust.vim"] 89 | path = pack/plugin/opt/rust.vim 90 | url = https://github.com/rust-lang/rust.vim 91 | [submodule "pack/plugin/opt/vim-colors-solarized"] 92 | path = pack/plugin/opt/vim-colors-solarized 93 | url = https://github.com/altercation/vim-colors-solarized 94 | [submodule "pack/plugin/opt/coc.nvim"] 95 | path = pack/plugin/opt/coc.nvim 96 | url = http://github.com/neoclide/coc.nvim 97 | [submodule "pack/plugin/opt/any-jump.vim"] 98 | path = pack/plugin/opt/any-jump.vim 99 | url = https://github.com/pechorin/any-jump.vim 100 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vim Config 2 | 3 | ## Install 4 | 5 | > wget https://raw.githubusercontent.com/VZIKL/vimrc/master/install.sh | sh -c 6 | 7 | ### Update Plugin 8 | 9 | > cd ~/.vim && git submodule update --remote 10 | 11 | ### Key Bindings 12 | 13 | --- 14 | 15 | | Keybinds | Description | 16 | | ---------- | --------------------------- | 17 | | kj | ESC | 18 | | F3 | Open NerdTree | 19 | | F5 | compile file | 20 | | H | To beginning of the line | 21 | | L | To ending of the line | 22 | | U | Redo | 23 | | gb | Next Buffer | 24 | | gB | Last Buffer | 25 | | C-j | AleNext(next error) | 26 | | C-k | AlePrevious(before error) | 27 | | , | Leader | 28 | | , j/k/h/l | easymotion j/k/h/l | 29 | | s + (word) | easymotion | 30 | | C-e | Snippets list (insert mode) | 31 | 32 | 33 | ### Plugin List 34 | 1. YouCompletetMe 35 | 2. supertab 36 | 3. auto-pairs 37 | 4. molokai 38 | 5. nerdcommenter 39 | 6. rainbow_parentheses.vim 40 | 7. tlib_vim 41 | 8. ultisnips 42 | 9. ale 43 | 10. LeaderF 44 | 11. vim-easymotion 45 | 12. vim-easy-align 46 | 13. vim-multiple-cursors 47 | 14. vim-snipmate 48 | 15. vim-snippets 49 | 16. vim-surround 50 | 17. …. 51 | -------------------------------------------------------------------------------- /c++_config.vim: -------------------------------------------------------------------------------- 1 | packadd vim-cpp-enhanced-highlight 2 | 3 | let g:cpp_class_scope_highlight = 1 4 | let g:cpp_member_variable_highlight = 1 5 | let g:cpp_class_decl_highlight = 1 6 | let g:cpp_experimental_simple_template_highlight = 1 7 | let g:cpp_experimental_template_highlight = 1 8 | let g:cpp_concepts_highlight = 1 9 | let g:cpp_no_function_highlight = 1 10 | -------------------------------------------------------------------------------- /coc-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "rust-analyzer.server.path":"~/.cargo/bin/rust-analyzer" 3 | } 4 | -------------------------------------------------------------------------------- /coc.vim: -------------------------------------------------------------------------------- 1 | " https://raw.githubusercontent.com/neoclide/coc.nvim/master/doc/coc-example-config.vim 2 | 3 | " May need for Vim (not Neovim) since coc.nvim calculates byte offset by count 4 | " utf-8 byte sequence 5 | set encoding=utf-8 6 | " Some servers have issues with backup files, see #649 7 | set nobackup 8 | set nowritebackup 9 | 10 | " Having longer updatetime (default is 4000 ms = 4s) leads to noticeable 11 | " delays and poor user experience 12 | set updatetime=300 13 | 14 | " Always show the signcolumn, otherwise it would shift the text each time 15 | " diagnostics appear/become resolved 16 | set signcolumn=yes 17 | 18 | " Use tab for trigger completion with characters ahead and navigate 19 | " NOTE: There's always complete item selected by default, you may want to enable 20 | " no select by `"suggest.noselect": true` in your configuration file 21 | " NOTE: Use command ':verbose imap ' to make sure tab is not mapped by 22 | " other plugin before putting this into your config 23 | inoremap 24 | \ coc#pum#visible() ? coc#pum#next(1) : 25 | \ CheckBackspace() ? "\" : 26 | \ coc#refresh() 27 | inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" 28 | 29 | " Make to accept selected completion item or notify coc.nvim to format 30 | " u breaks current undo, please make your own choice 31 | inoremap coc#pum#visible() ? coc#pum#confirm() 32 | \: "\u\\=coc#on_enter()\" 33 | 34 | function! CheckBackspace() abort 35 | let col = col('.') - 1 36 | return !col || getline('.')[col - 1] =~# '\s' 37 | endfunction 38 | 39 | " Use to trigger completion 40 | if has('nvim') 41 | inoremap coc#refresh() 42 | else 43 | inoremap coc#refresh() 44 | endif 45 | 46 | " Use `[g` and `]g` to navigate diagnostics 47 | " Use `:CocDiagnostics` to get all diagnostics of current buffer in location list 48 | nmap [g (coc-diagnostic-prev) 49 | nmap ]g (coc-diagnostic-next) 50 | 51 | " GoTo code navigation 52 | nmap gd (coc-definition) 53 | nmap gy (coc-type-definition) 54 | nmap gi (coc-implementation) 55 | nmap gr (coc-references) 56 | 57 | " Use K to show documentation in preview window 58 | nnoremap K :call ShowDocumentation() 59 | 60 | function! ShowDocumentation() 61 | if CocAction('hasProvider', 'hover') 62 | call CocActionAsync('doHover') 63 | else 64 | call feedkeys('K', 'in') 65 | endif 66 | endfunction 67 | 68 | " Highlight the symbol and its references when holding the cursor 69 | autocmd CursorHold * silent call CocActionAsync('highlight') 70 | 71 | " Symbol renaming 72 | nmap rn (coc-rename) 73 | 74 | " Formatting selected code 75 | xmap f (coc-format-selected) 76 | nmap f (coc-format-selected) 77 | 78 | augroup mygroup 79 | autocmd! 80 | " Setup formatexpr specified filetype(s) 81 | autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') 82 | " Update signature help on jump placeholder 83 | autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') 84 | augroup end 85 | 86 | " Applying code actions to the selected code block 87 | " Example: `aap` for current paragraph 88 | xmap a (coc-codeaction-selected) 89 | nmap a (coc-codeaction-selected) 90 | 91 | " Remap keys for applying code actions at the cursor position 92 | nmap ac (coc-codeaction-cursor) 93 | " Remap keys for apply code actions affect whole buffer 94 | nmap as (coc-codeaction-source) 95 | " Apply the most preferred quickfix action to fix diagnostic on the current line 96 | nmap qf (coc-fix-current) 97 | 98 | " Remap keys for applying refactor code actions 99 | nmap re (coc-codeaction-refactor) 100 | xmap r (coc-codeaction-refactor-selected) 101 | nmap r (coc-codeaction-refactor-selected) 102 | 103 | " Run the Code Lens action on the current line 104 | nmap cl (coc-codelens-action) 105 | 106 | " Map function and class text objects 107 | " NOTE: Requires 'textDocument.documentSymbol' support from the language server 108 | xmap if (coc-funcobj-i) 109 | omap if (coc-funcobj-i) 110 | xmap af (coc-funcobj-a) 111 | omap af (coc-funcobj-a) 112 | xmap ic (coc-classobj-i) 113 | omap ic (coc-classobj-i) 114 | xmap ac (coc-classobj-a) 115 | omap ac (coc-classobj-a) 116 | 117 | " Remap and to scroll float windows/popups 118 | if has('nvim-0.4.0') || has('patch-8.2.0750') 119 | nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" 120 | nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" 121 | inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" 122 | inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" 123 | vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" 124 | vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" 125 | endif 126 | 127 | " Use CTRL-S for selections ranges 128 | " Requires 'textDocument/selectionRange' support of language server 129 | nmap (coc-range-select) 130 | xmap (coc-range-select) 131 | 132 | " Add `:Format` command to format current buffer 133 | command! -nargs=0 Format :call CocActionAsync('format') 134 | 135 | " Add `:Fold` command to fold current buffer 136 | command! -nargs=? Fold :call CocAction('fold', ) 137 | 138 | " Add `:OR` command for organize imports of the current buffer 139 | command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport') 140 | 141 | " Add (Neo)Vim's native statusline support 142 | " NOTE: Please see `:h coc-status` for integrations with external plugins that 143 | " provide custom statusline: lightline.vim, vim-airline 144 | set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} 145 | 146 | " Mappings for CoCList 147 | " Show all diagnostics 148 | nnoremap a :CocList diagnostics 149 | " Manage extensions 150 | nnoremap e :CocList extensions 151 | " Show commands 152 | nnoremap c :CocList commands 153 | " Find symbol of current document 154 | nnoremap o :CocList outline 155 | " Search workspace symbols 156 | nnoremap s :CocList -I symbols 157 | " Do default action for next item 158 | nnoremap j :CocNext 159 | " Do default action for previous item 160 | nnoremap k :CocPrev 161 | " Resume latest coc list 162 | nnoremap p :CocListResume 163 | -------------------------------------------------------------------------------- /golang.vim: -------------------------------------------------------------------------------- 1 | packadd vim-go 2 | let g:go_disable_autoinstall = 0 3 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if which emerge &> /dev/null;then 3 | sudo emerge -av dev-util/ctags vim net-misc/curl x11-misc/xclip dev-util/astyle x11-misc/xdg-utils net-libs/nodejs dev-vcs/git dev-util/cmake dev-python/setuptools dev-util/monodevelop dev-util/cargo pyflakes dev-python/pip clang llvm gcc 4 | elif which apt-get &> /dev/null;then 5 | sudo apt-get install ctags vim curl xclip astyle xdg-utils nodejs git cmake python-setuptools monodevelop cargo pyflakes python-pip clang llvm gcc 6 | fi 7 | git clone https://github.com/VZIKL/vimrc ~/.vim 8 | cd ~/.vim && git submodule update --init --recursive 9 | cp ~/.vim/vimrc ~/.vimrc 10 | cp ~/.vim/pack/plugin/opt/YouCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py ~ 11 | cp ~/.vim/pack/plugin/opt/slimv/syntax/lisp/slimv-syntax-lisp.vim ~/.vim/syntax/ 12 | 13 | cp ~/.vim/pack/plugin/opt/vim-airline-themes/autoload/airline/themes/* ~/.vim/pack/plugin/opt/vim-airline/autoload/airline/themes/ 14 | 15 | rm ~/install.sh 16 | -------------------------------------------------------------------------------- /lisp_config.vim: -------------------------------------------------------------------------------- 1 | packadd slimv 2 | let g:slimv_swank_cmd = 'sbcl --load ~/.vim/pack/plugin/opt/slimv/slime/start-swank.lisp &' 3 | -------------------------------------------------------------------------------- /markdown.vim: -------------------------------------------------------------------------------- 1 | packadd vim-markdown 2 | packadd vim-instant-markdown 3 | let g:vim_markdown_folding_disabled = 1 4 | let g:vim_markdown_no_extensions_in_markdown = 1 5 | let g:instant_markdown_autostart = 1 6 | 7 | -------------------------------------------------------------------------------- /python_config.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | 3 | let b:ale_linters = ['ruff'] 4 | let b:ale_fixers = ['black'] 5 | let b:ale_warn_about_trailing_whitespace = 0 6 | -------------------------------------------------------------------------------- /rust.vim: -------------------------------------------------------------------------------- 1 | packadd rust.vim 2 | let g:rustfmt_autosave = 1 3 | let g:rust_clip_command = 'pbcopy' 4 | 5 | -------------------------------------------------------------------------------- /ui.vim: -------------------------------------------------------------------------------- 1 | packadd vim-airline-themes 2 | packadd vim-airline 3 | 4 | 5 | 6 | 7 | let g:airline_powerline_fonts = 1 8 | let g:airline_detect_whitespace = 0 9 | let g:airline#extensions#tabline#enabled = 1 10 | let g:airline#extensions#tabline#buffer_nr_show = 1 11 | " let g:airline#themes#spring_night 12 | let g:airline_theme = "powerlineish" 13 | let g:airline_left_sep = '' 14 | let g:airline_left_alt_sep = '' 15 | let g:airline_right_sep = '' 16 | let g:airline_right_alt_sep = '' 17 | let g:airline_symbols.branch = '' 18 | let g:airline_symbols.readonly = '' 19 | let g:airline_symbols.linenr = '' 20 | -------------------------------------------------------------------------------- /vimrc: -------------------------------------------------------------------------------- 1 | "vimrc 2 | set mouse=a 3 | set number 4 | set noswapfile 5 | set nocompatible 6 | set shm=atI 7 | set smarttab 8 | set sw=4 9 | set tabstop=4 10 | set ts=4 11 | set viminfo+=! 12 | set ww+=<,>,h,l 13 | set fillchars=stl:^,stlnc:=,vert:\|,fold:-,diff:- 14 | 15 | set backspace=2 16 | 17 | 18 | filetype plugin indent on 19 | 20 | source ~/.vim/ui.vim 21 | source ~/.vim/coc.vim 22 | 23 | au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn} set filetype=markdown 24 | au BufRead,BufNewFile *.qml set filetype=qml 25 | 26 | au filetype lisp source ~/.vim/lisp_config.vim 27 | au filetype markdown source ~/.vim/markdown.vim 28 | au filetype cpp,c source ~/.vim/c++_config.vim 29 | au filetype python source ~/.vim/python_config.vim 30 | au filetype go source ~/.vim/golang.vim 31 | au filetype rust source ~/.vim/rust.vim 32 | 33 | autocmd BufNewFile *.cpp,*.[ch],*.sh,*.py,*.lua,*.pl,*.rb exec ":call SetTitle()" 34 | autocmd BufNewFile * normal G 35 | " au BufWrite * :Autoformat 36 | 37 | 38 | augroup Mkdir 39 | autocmd! 40 | autocmd BufWritePre * 41 | \ if !isdirectory(expand(":p:h")) | 42 | \ call mkdir(expand(":p:h"), "p") | 43 | \ endif 44 | augroup END 45 | 46 | func SetTitle() 47 | if &filetype == 'sh' 48 | call setline(1,"#!/bin/bash") 49 | call append(line("."),"") 50 | elseif &filetype == 'lua' 51 | call setline(1,"#!/usr/bin/lua") 52 | call append(line("."),"") 53 | elseif &filetype == 'python' 54 | call setline(1,"#!/usr/bin/python") 55 | call append(line("."),"") 56 | elseif &filetype == 'perl' 57 | call setline(1,"#!/usr/bin/perl") 58 | call append(line("."),"") 59 | elseif &filetype == 'ruby' 60 | call setline(1,"#!/usr/bin/ruby") 61 | call append(line("."),"") 62 | else 63 | call setline(1, "//File Name: ".expand("%")) 64 | call append(line("."), "//Author: ") 65 | call append(line(".")+1, "//Mail: ") 66 | call append(line(".")+2, "//Created Time: ".strftime("%c")) 67 | endif 68 | if &filetype == 'c' 69 | call append(line(".")+3, "#include") 70 | call append(line(".")+4, "") 71 | endif 72 | if expand("%:e") == 'h' 73 | call append(line(".")+3, "#ifndef _".toupper(expand("%:r"))."_H") 74 | call append(line(".")+4, "#define _".toupper(expand("%:r"))."_H") 75 | call append(line(".")+5, "#endif") 76 | endif 77 | endfunc 78 | 79 | 80 | 81 | map :call Compile() 82 | func! Compile() 83 | exec "w" 84 | if &filetype == "c" 85 | if findfile("makefile", ".;") == "makefile" 86 | exec "!make rebuild" 87 | exec "!bash -c 'time ./%<'" 88 | else 89 | exec "!g++ % -o %<" 90 | exec "!bash -c 'time ./%<'" 91 | endif 92 | elseif &filetype == "cpp" 93 | if findfile("makefile", ".;") == "makefile" 94 | exec "!make rebuild" 95 | exec "!bash -c 'time ./%<'" 96 | else 97 | exec "!g++ % -o %< -std=c++14" 98 | exec "!bash -c 'time ./%<'" 99 | endif 100 | elseif &filetype == "asm" 101 | exec "!nasm -f elf ./% -o ./%<.o" 102 | exec "!gcc -m32 ./%<.o -o ./%<" 103 | exec "!bash -c 'time ./%<'" 104 | elseif &filetype == "sh" 105 | exec "!bash -c 'time bash %'" 106 | elseif &filetype == "python" 107 | exec "!bash -c 'time python %'" 108 | elseif &filetype == "go" 109 | exec "!bash -c 'time go build %'" 110 | exec "!bash -c 'time ./%<'" 111 | elseif &filetype == "javascript" 112 | exec "!node %<" 113 | elseif &filetype == "lua" 114 | exec "!bash -c 'time lua %'" 115 | elseif &filetype == "perl" 116 | exec "!bash -c 'time perl %'" 117 | elseif &filetype == "ruby" 118 | exec "!bash -c 'time ruby %'" 119 | elseif &filetype == "qml" 120 | exec "!bash -c 'time qmlscene %'" 121 | elseif &filetype == "ebuild" 122 | exec "!ebuild % manifest" 123 | endif 124 | endfunc 125 | 126 | map w 127 | map 128 | map 129 | map 130 | map 131 | 132 | nnoremap 2 133 | nnoremap 2 134 | nnoremap U 135 | noremap gk k 136 | noremap gj j 137 | noremap H ^ 138 | noremap L $ 139 | 140 | inoremap kj 141 | 142 | inoremap pumvisible() ? "\" : "\" "回车即选中当前项 143 | inoremap pumvisible() ? "\" : "\" 144 | inoremap pumvisible() ? "\" : "\" 145 | 146 | 147 | " autocmd vimenter * NERDTree 148 | " autocmd vimenter * wincmd p 149 | 150 | if has("autocmd") 151 | au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif 152 | endif 153 | 154 | let mapleader=',' 155 | let g:mapleader=',' 156 | 157 | "Plugin List 158 | packadd colorizer 159 | packadd supertab 160 | packadd auto-pairs 161 | packadd vim-polyglot 162 | packadd nerdcommenter 163 | packadd rainbow_parentheses.vim 164 | packadd tlib_vim 165 | packadd ultisnips 166 | packadd ale 167 | packadd LeaderF 168 | packadd vim-addon-mw-utils 169 | "packadd vim-autoclose 170 | packadd vim-autoformat 171 | packadd vim-closetag 172 | packadd vim-easymotion 173 | packadd any-jump.vim 174 | packadd vim-easy-align 175 | packadd vim-fugitive 176 | packadd vim-multiple-cursors 177 | packadd vim-snippets 178 | packadd vim-surround 179 | packadd vimproc.vim 180 | " packadd vim-colors-solarized 181 | packadd coc.nvim 182 | 183 | set completeopt=longest,menu 184 | autocmd InsertLeave * if pumvisible() == 0|pclose|endif 185 | 186 | 187 | let g:UltiSnipsExpandTrigger = "" 188 | let g:UltiSnipsJumpForwardTrigger = "" 189 | let g:UltiSnipsListSnippets = "" 190 | 191 | 192 | set statusline+=%#warningmsg# 193 | set statusline+=%{SyntasticStatuslineFlag()} 194 | set statusline+=%* 195 | 196 | 197 | let g:multi_cursor_use_default_mapping = 0 198 | let g:multi_cursor_next_key = '' 199 | let g:multi_cursor_prev_key = '' 200 | let g:multi_cursor_skip_key = '' 201 | let g:multi_cursor_quit_key = '' 202 | 203 | 204 | let g:EasyMotion_do_mapping = 0 " Disable default mappings 205 | nmap s (easymotion-overwin-f) 206 | nmap s (easymotion-overwin-f2) 207 | let g:EasyMotion_smartcase = 1 208 | map l (easymotion-lineforward) 209 | map j (easymotion-j) 210 | map k (easymotion-k) 211 | map h (easymotion-linebackward) 212 | 213 | nmap ga (EasyAlign) 214 | xmap ga (EasyAlign) 215 | 216 | "ale binding 217 | let g:ale_sign_error = 'X' 218 | let g:ale_sign_warning = '!' 219 | nmap (ale_previous_wrap) 220 | nmap (ale_next_wrap) 221 | 222 | 223 | 224 | " Show icons, icons are shown by default 225 | let g:Lf_ShowDevIcons = 1 226 | " For GUI vim, the icon font can be specify like this, for example 227 | let g:Lf_DevIconsFont = "DroidSansMono Nerd Font Mono" 228 | " If needs 229 | set ambiwidth=double 230 | let g:Lf_WindowPosition = 'popup' 231 | let g:Lf_StlSeparator = { 'left': "\ue0b0", 'right': "\ue0b2", 'font': "DejaVu Sans Mono for Powerline" } 232 | let g:Lf_PreviewResult = {'Function': 0, 'BufTag': 0 } 233 | 234 | 235 | 236 | 237 | 238 | 239 | syntax enable 240 | "set background=light 241 | "colorscheme solarized 242 | 243 | set encoding=utf-8 244 | set fileencoding=utf-8 245 | --------------------------------------------------------------------------------