-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugins.vim
123 lines (99 loc) · 3.32 KB
/
plugins.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
" vim-plug {{{
call plug#begin('~/.vim/plugged')
Plug 'lifepillar/vim-gruvbox8'
" Buffer tab line
Plug 'ap/vim-buftabline'
" Indentation guide lines
Plug 'thaerkh/vim-indentguides'
let g:indentguides_toggleListMode=0
" Fuzzy finder
" Plug 'kien/ctrlp.vim'
" let g:ctrlp_working_path_mode = 'ra'
" fzf
Plug '/usr/local/opt/fzf'
let g:fzf_layout = { 'down': '~30%' }
nnoremap <C-p> :FZF<CR>
" Simpler way to move inside a file
Plug 'Lokaltog/vim-easymotion'
let g:EasyMotion_smartcase = 1
" Autocomplete with <Tab>
Plug 'ervandew/supertab'
" Bindings to toggle comments
Plug 'tomtom/tcomment_vim'
nnoremap // :TComment<CR>
vnoremap // :TComment<CR>
" Syntax checker
Plug 'scrooloose/syntastic', { 'on': 'SyntasticCheck' }
let g:syntastic_mode_map = { "mode": "passive" }
nnoremap <silent> <F8> :SyntasticCheck<CR>
nnoremap <silent> <F9> :SyntasticReset<CR>
" code fmt
Plug 'google/vim-maktaba'
Plug 'google/vim-codefmt'
" augroup autoformat_settings
" autocmd FileType bzl AutoFormatBuffer buildifier
" autocmd FileType c,cpp,proto,javascript,arduino AutoFormatBuffer clang-format
" autocmd FileType dart AutoFormatBuffer dartfmt
" autocmd FileType go AutoFormatBuffer gofmt
" autocmd FileType gn AutoFormatBuffer gn
" autocmd FileType html,css,sass,scss,less,json AutoFormatBuffer js-beautify
" autocmd FileType java AutoFormatBuffer google-java-format
" autocmd FileType python AutoFormatBuffer yapf
" " Alternative: autocmd FileType python AutoFormatBuffer autopep8
" autocmd FileType rust AutoFormatBuffer rustfmt
" autocmd FileType vue AutoFormatBuffer prettier
" augroup END
" cpp syntax
Plug 'bfrg/vim-cpp-modern'
" Snippets
" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" Latex
" Plug 'lervag/vimtex', { 'for': ['tex', 'cls', 'sty', 'bib'] }
" let g:vimtex_latexmk_callback=0
" Tagbar
Plug 'majutsushi/tagbar', { 'on': 'TagbarToggle' }
nmap <leader>t :TagbarToggle<CR>
" Easy switch between header and code files
Plug 'derekwyatt/vim-fswitch', { 'for': ['c', 'cpp'] }
nmap <silent> <leader>of :FSHere<CR>
nmap <silent> <leader>ol :FSRight<CR>
nmap <silent> <leader>oL :FSSplitRight<CR>
nmap <silent> <leader>oh :FSLeft<CR>
nmap <silent> <leader>oH :FSSplitLeft<CR>
nmap <silent> <leader>ok :FSAbove<CR>
nmap <silent> <leader>oK :FSSplitAbove<CR>
nmap <silent> <leader>oj :FSBelow<CR>
nmap <silent> <leader>oJ :FSSplitBelow<CR>
" Python
Plug 'Vimjas/vim-python-pep8-indent', { 'for': ['python'] }
Plug 'tmhedberg/SimpylFold', { 'for': ['python'] }
" Support for HTML5
Plug 'othree/html5.vim', { 'for': ['php', 'html'] }
" Zen coding
Plug 'mattn/emmet-vim', { 'for': ['php', 'html', 'css'] }
" Git integration
" Plug 'tpope/vim-fugitive'
" Git gutter
" Plug 'airblade/vim-gitgutter'
" let g:gitgutter_sign_column_always = 1
" let g:gitgutter_map_keys = 0
" VCS diff
Plug 'mhinz/vim-signify'
let g:signify_realtime = 1
let g:signify_vcs_list = ['hg', 'git']
if exists('g:signify_vcs_cmds')
let g:signify_vcs_cmds['hg'] =
\ 'hg diff -w --config extensioons.color=! --config defaults.diff= --nodates -U0 -- %f'
endif
" Async grep
Plug 'mhinz/vim-grepper'
nmap gs <plug>(GrepperOperator)
xmap gs <plug>(GrepperOperator)
let g:grepper = {
\ 'tools': ['rg'],
\ 'dir': 'filecwd',
\}
nnoremap <leader>g :Grepper -cword -noprompt<CR>
nnoremap <leader>G :Grepper -dir repo -cword -noprompt<CR>
call plug#end()
" }}} vim-plug