-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vsvimrc
75 lines (60 loc) · 2.2 KB
/
.vsvimrc
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
" search settings {
set ignorecase
set smartcase
set incsearch
"set showmatch
set hlsearch
" }
" key mappings {
let mapleader = ","
"Saves time; maps the spacebar to colon
nmap <space> :
"semicolon insertion
" inoremap <leader>; <C-o>m`<C-o>A;<C-o>``
" nnoremap ; m`A;<esc>``
nnoremap Y y$
nnoremap s "0p
"navigate by row
nnoremap j gj
nnoremap k gk
nnoremap H ^
nnoremap L $
nnoremap Q @@ "Instead of stumbling into ex mode, repeat the last macro used.
"paste default buffer on newline and autoindent
" nnoremap <leader>v o<C-R>"<ESC>
nnoremap <leader>v "0p<ESC>
nnoremap / /\v
vnoremap / /\v
nnoremap <Leader><space> :noh<cr>
" todo: figure out why remapping tab doesn't work
nnoremap <tab> %
vnoremap <tab> %
" Visual Studio specific commands {
map <Leader>w :vsc Edit.SubwordNext<cr>
map <Leader>e :vsc Edit.SubwordNextExtend<cr>
map <Leader>b :vsc Build.BuildSolution<cr>
map <Leader>p :vsc Debug.ToggleBreakpoint<cr>
map <Leader>t :vsc Resharper.Resharper_GotoType<cr>
map <Leader>f :vsc Resharper.Resharper_GotoFile<cr>
map <Leader>d :vsc Resharper.Resharper_ReformatCode<cr>
" map <Leader>d :vsc Edit.FormatDocument<cr>
map <Leader>s :vsc Edit.FormatSelection<cr>
map <Leader>c :vsc Resharper.Resharper_LineComment<cr>
map z. :vsc View.QuickActions<cr>
" map <Leader>c :vsc Edit.CommentSelection<cr>
" map <Leader>u :vsc Edit.UncommentSelection<cr>
map <Leader>r :vsc TestExplorer.RepeatLastRun<cr>
" map <Leader>r :vsc ReSharper.ReSharper_UnitTestRunContext<cr>
nnoremap t :vsc Resharper_HumpNext<cr>
nnoremap T :vsc Resharper_HumpPrev<cr>
vnoremap t :vsc Resharper_HumpNext<cr>
vnoremap T :vsc Resharper_HumpPrev<cr>
nmap <C-O> :vsc View.NavigateBackward<CR>
nmap <C-I> :vsc View.NavigateForward<CR>
" }
" }
set relativenumber
set number
set shiftwidth=4 " Use indents of 4 spaces
set expandtab " Tabs are spaces, not tabs
set tabstop=4 " An indentation every four columns