-
Notifications
You must be signed in to change notification settings - Fork 1
/
vscode-settings.vim
38 lines (31 loc) · 2.06 KB
/
vscode-settings.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
" Better Navigation
nnoremap <silent> <C-j> :call VSCodeNotify('workbench.action.navigateDown')<CR>
xnoremap <silent> <C-j> :call VSCodeNotify('workbench.action.navigateDown')<CR>
nnoremap <silent> <C-k> :call VSCodeNotify('workbench.action.navigateUp')<CR>
xnoremap <silent> <C-k> :call VSCodeNotify('workbench.action.navigateUp')<CR>
nnoremap <silent> <C-h> :call VSCodeNotify('workbench.action.navigateLeft')<CR>
xnoremap <silent> <C-h> :call VSCodeNotify('workbench.action.navigateLeft')<CR>
nnoremap <silent> <C-l> :call VSCodeNotify('workbench.action.navigateRight')<CR>
xnoremap <silent> <C-l> :call VSCodeNotify('workbench.action.navigateRight')<CR>
" Closing and saving
nnoremap <silent> ,e :call VSCodeNotify('workbench.action.closeActiveEditor')<CR>
xnoremap <silent> ,e :call VSCodeNotify('workbench.action.closeActiveEditor')<CR>
nnoremap <silent> ,ee :call VSCodeNotify('workbench.action.closeEditorsInGroup')<CR>
xnoremap <silent> ,ee :call VSCodeNotify('workbench.action.closeEditorsInGroup')<CR>
nnoremap <silent> ,w :call VSCodeNotify('workbench.action.files.save')<CR>
xnoremap <silent> ,w :call VSCodeNotify('workbench.action.files.save')<CR>
nnoremap <silent> ,ww :call VSCodeNotify('workbench.action.files.saveAll')<CR>
xnoremap <silent> ,ww :call VSCodeNotify('workbench.action.files.saveAll')<CR>
nnoremap gr <Cmd>call VSCodeNotify('editor.action.goToReferences')<CR>
" Bind C-/ to vscode commentary since calling from vscode produces double comments due to multiple cursors
xnoremap <expr> <C-/> <SID>vscodeCommentary()
nnoremap <expr> <C-/> <SID>vscodeCommentary() . '_'
nnoremap <silent> <C-w>_ :<C-u>call VSCodeNotify('workbench.action.toggleEditorWidths')<CR>
nnoremap <silent> <Space> :call VSCodeNotify('whichkey.show')<CR>
xnoremap <silent> <Space> :call VSCodeNotify('whichkey.show')<CR>
"xnoremap <silent> <Space> :<C-u>call <SID>openWhichKeyInVisualMode()<CR>
xnoremap <silent> <C-P> :<C-u>call <SID>openVSCodeCommandsInVisualMode()<CR>
xmap gc <Plug>VSCodeCommentary
nmap gc <Plug>VSCodeCommentary
omap gc <Plug>VSCodeCommentary
nmap gcc <Plug>VSCodeCommentaryLine