-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvsvimrc
More file actions
42 lines (35 loc) · 1.4 KB
/
vsvimrc
File metadata and controls
42 lines (35 loc) · 1.4 KB
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
let mapleader="\<space>"
inoremap jk <Esc>
set number
set expandtab
set tabstop=8
set shiftwidth=4
set softtabstop=4
set ignorecase
set smartcase
set incsearch
set hlsearch
set clipboard=unnamed
set nocursorline
set scrolloff=5
set visualbell
" use VS style jumps which track entire session and not just jumps within buffer
nnoremap <C-o> :vsc View.NavigateBackward<CR>
nnoremap <C-i> :vsc View.NavigateForward<CR>
" allow jump to declaration in external file
" note: this should actually be Edit.GoToDefinition since that's what <F12> is
" bound to and the behaviour we want, but for some reason using <C-]> when
" it's bound to Edit.GoToDefinition doesn't behave the same so we use
" Edit.GoToDeclaration instead, which seems to be more consistent... if <C-]>
" fails, try <F12>
nnoremap <C-]> :vsc Edit.GoToDeclaration<CR>
" note: there doesn't seem to be command to toggle comment
nnoremap gcc :vsc Edit.CommentSelection<CR>
nnoremap gnc :vsc Edit.UncommentSelection<CR>
" TODO: report bug: trailing '<Esc><Esc>' is required otherwise vsvim goes
" into command mode, single '<Esc>' doesn't seem to work so two are used
vnoremap gc :vsc Edit.CommentSelection<CR><Esc><Esc>
vnoremap gn :vsc Edit.UncommentSelection<CR><Esc><Esc>
" TODO: report bug: visually select region, :normal gcgv, should reselect last visual
" block, only selects bottom line in previous block
nnoremap <Leader>ra :vsc TestExplorer.RunAllTests<CR>