-
Notifications
You must be signed in to change notification settings - Fork 3
/
addons-config.vim
161 lines (141 loc) · 4.37 KB
/
addons-config.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
"{{{ schlepp
vmap <unique> <S-up> <Plug>SchleppUp
vmap <unique> <S-down> <Plug>SchleppDown
vmap <unique> <S-left> <Plug>SchleppLeft
vmap <unique> <S-right> <Plug>SchleppRight
vmap <unique> D <Plug>SchleppDup
"}}}
"
"{{{ deoplete and completion
" https://vim.fandom.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE
" :set completeopt=longest,menuone
" let g:deoplete#enable_at_startup = 1
" let g:deoplete#disable_auto_complete = 1
" let g:deoplete#complete_method = "omnifunc"
" if !exists('g:deoplete#omni#input_patterns')
" let g:deoplete#omni#input_patterns = {}
" endif
" inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
"}}}
"{{{ LanguageClient-neovim
" Required for operations modifying multiple buffers like rename.
" set hidden
" let g:LanguageClient_serverCommands = {
" \ 'javascript': ['javascript-typescript-stdio'],
" \ }
" nnoremap <silent> K :call LanguageClient_textDocument_hover()<CR>
" nnoremap <silent> gd :call LanguageClient_textDocument_definition()<CR>
" nnoremap <silent> <F2> :call LanguageClient_textDocument_rename()<CR>
"}}}
"{{{ UltiSnips
let g:UltiSnipsEditSplit = 'horizontal'
let g:UltiSnipsSnippetsDir = NVIMHOME . '/UltiSnips'
" UltiSnips triggering
let g:UltiSnipsExpandTrigger = '<C-j>'
let g:UltiSnipsJumpForwardTrigger = '<C-j>'
let g:UltiSnipsJumpBackwardTrigger = '<C-k>'
"}}}
"
"{{{ rdf
au! BufNewFile,BufRead *.ttl,*.nt,*.nq set filetype=turtle
au! BufNewFile,BufRead *.trig set filetype=trig
au! BufNewFile,BufRead *.n3 set filetype=n3
au! BufNewFile,BufRead *.jsonld set filetype=jsonld
"}}}
"{{{ Solarized
" set background=dark
" colorscheme solarized
colorscheme NeoSolarized
"}}}
"{{{ Tagbar
let g:tagbar_autoclose = 1
" toggle outline
nmap <leader>to :TagbarToggle<CR>
"}}}
"{{{ NERDTree
let NERDTreeShowBookmarks=1
let NERDTreeIgnore=['\.aux$', '\.log$', '\.lof', '\.lol', '\.lot']
nmap <leader>n :lcd %:p:h<CR>:NERDTreeTabsToggle<CR>
"}}}
"{{{ CTRLP
nmap <leader>l :CtrlPMRU<CR>
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn)$',
\ 'file': '\v(mutt-soljaris.*|COMMIT.*|TAG.*)$',
\ }
"}}}
"{{{ toggle graphical undo visualization
nmap <leader>tu :GundoToggle<CR>
"}}}
"{{{ Yankstack specific bindings
" https://github.com/maxbrunsfeld/vim-yankstack
let g:yankstack_map_keys = 0
nmap <leader>p <Plug>yankstack_substitute_older_paste
nmap <leader>P <Plug>yankstack_substitute_newer_paste
"}}}
"{{{ dash
" search for the keyword under the cursor via dash
" nmap <silent> <leader>d <Plug>DashSearch
"}}}
"
"{{{ syntastic options
let g:syntastic_enable_signs=1
let g:syntastic_auto_jump=0
let g:syntastic_auto_loc_list=2
"let g:syntastic_quiet_warnings=1
let g:syntastic_phpcs_disable = 1
" http://stackoverflow.com/questions/18270355
let g:syntastic_html_tidy_ignore_errors=[" proprietary attribute \"ng-"]
nmap <leader>tc :SyntasticToggleMode<CR>
" https://jaxbot.me/articles/setting-up-vim-for-react-js-jsx-02-03-2015
let g:syntastic_javascript_checkers = ['eslint']
" https://gist.github.com/thikade/87f643ce8db86423fa7d245f7556a601
let g:syntastic_yaml_checkers = [ "yamllint" ]
"}}}
"{{{ CheckAttach
let g:checkattach_filebrowser='ranger'
let g:checkattach_once='y'
"}}}
"{{{ Indent Guides
let g:indent_guides_auto_colors = 0
" let g:indent_guides_start_level = 2
" let g:indent_guides_guide_size = 1
hi IndentGuidesOdd ctermbg=234
hi IndentGuidesEven ctermbg=235
"}}}
" {{{ Markdown
autocmd FileType markdown nmap <leader>to :Toch<CR>
let g:vim_markdown_folding_disabled=1
let g:vim_markdown_toc_autofit = 1
" }}}
" {{{ airline
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
" }}}
" {{{ editorconfig
let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
" }}}
" {{{ fugitive
" just git status
nnoremap <leader>gs :Gstatus<CR>
" commit from the current staging area
nnoremap <leader>gc :Gcommit -v -q<CR>
" commit from the current file
nnoremap <leader>gt :Gcommit -v -q %:p<CR>
" diff of current file
nnoremap <leader>gd :Gdiff<CR>
" just fugititve git edit
nnoremap <leader>ge :Gedit<CR>
" just fugititve git read
nnoremap <leader>gr :Gread<CR>
" just fugititve git write
nnoremap <leader>gw :Gwrite<CR><CR>
" git log
nnoremap <leader>gl :silent! Glog<CR>:bot copen<CR>
" }}}
" {{{ gitgutter
" add current hunk to stage
nnoremap <leader>ga :GitGutterStageHunk<CR><CR>
" toggle line highlights
nnoremap <leader>tg :GitGutterLineHighlightsToggle<CR><CR>
" }}}