-
Notifications
You must be signed in to change notification settings - Fork 0
/
vsvimrc
166 lines (139 loc) · 5.11 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
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
162
163
164
165
166
" Set global shortcut in Visual Studio options:
" Window.ActivateDocumentWindow => Esc
" External tool to open new Vim at current line:
" gvim.exe $(ItemPath) +$(CurLine)
" External tool to open in Vim server:
" gvim.exe --servername vsvim --remote-silent $(ItemPath)
"
" nnoremap yx<bs> :vsc OtherContextMenus.FSIConsoleContext.ResetInteractiveSession<cr>
" nnoremap !m :vsc OtherContextMenus.FSIConsoleContext.ResetInteractiveSession<bar>vsc Build.BuildSelection<cr>
set ignorecase
set smartcase
set incsearch
set tabstop=4
set shiftwidth=4
set backspace=eol,start,indent
set nostartofline
set hlsearch
set autoindent
set expandtab
set ttimeout
set ttimeoutlen=50
inoremap z, <c-o>
inoremap z,p <c-r>"
"horrible hack because VsVim refuses to fix this bug
nnoremap g; u<c-r>
nnoremap \ ,
nnoremap gj i<cr><esc>k$
nnoremap s /
nnoremap S ?
nnoremap zy zt5<c-y>
nnoremap gwo :vsc FullScreen<cr>
nnoremap gws :vsc Window.Split<cr>
nnoremap gwc :vsc Window.Split<cr>
nnoremap d<tab> :vsc Window.CloseDocumentWindow<cr>
nnoremap gwC :vsc Window.CloseDocumentWindow<cr>
nnoremap gwH :vsc Window.MovetoPreviousTabGroup<cr>
nnoremap gwL :vsc Window.MovetoNextTabGroup<cr>
nnoremap gwS :vsc Window.NewHorizontalTabGroup<cr>
nnoremap gwv :vsc Window.NewVerticalTabGroup<cr>
nnoremap gwT :vsc Window.Float<cr>
nnoremap gwj :vsc Window.NextSplitPane<cr>
nnoremap gwk :vsc Window.PreviousSplitPane<cr>
nnoremap <c-d> <PageDown>
nnoremap <c-u> <PageUp>
nnoremap z. :w<cr>
nnoremap vd "_d
xnoremap x "_d
nnoremap vD "_D
xnoremap P "0p
nnoremap =p o<esc>p==
nnoremap =P O<esc>p==
xnoremap Y "+y
nnoremap <c-l> :nohlsearch<cr>
xnoremap - $
nnoremap - $
nnoremap <c-n> n.
nnoremap Q @@
nnoremap ]e :m+1<cr>
nnoremap [e :m-2<cr>j
xnoremap ]e :m'>+1<cr>gv
xnoremap [e :m'<-2<cr>jgv
nnoremap Y y$
nnoremap <c-o> :vsc View.NavigateBackward<cr>
nnoremap <c-i> :vsc View.NavigateForward<cr>
xnoremap gc :vsc Edit.CommentSelection<cr>
nnoremap gcc V:vsc Edit.CommentSelection<cr>
"version control
nnoremap Ud :vsc Team.Git.CompareWithUnmodified<cr>
nnoremap Us :vsc Team.Git.GoToGitChanges<cr>
nnoremap ]c :vsc Diff.NextDifference<cr>
nnoremap [c :vsc Diff.PreviousDifference<cr>
" gs => expression manipulation
" cr => refactor
" g/ => navigation (search for files/symbols)
" gk => inspection
" g] => peek current symbol
" ]I
" ]d
" debugging
nnoremap gr :vsc Edit.FindAllReferences<cr>
" go to the type of the current symbol
nnoremap gD :vsc ReSharper.ReSharper_GotoTypeDeclaration<cr>
nnoremap gI :vsc ReSharper.ReSharper_GotoImplementation<cr>
nnoremap gI :vsc Edit.GoToImplementation<cr>
" go to class member ("outline")
nnoremap <M-o> :vsc ReSharper.ReSharper_GotoFileMember<cr>
" go to file
nnoremap <C-p> :vsc ReSharper.ReSharper_GotoFile<cr>
" go to anything ("tags"/types/symbols/files)
nnoremap g/t :vsc ReSharper.ReSharper_GotoType<cr>
" grep everything
nnoremap g// :vsc Edit.FindinFiles<cr>
" find/replace in current buffer
nnoremap g/r :vsc Edit.Replace<cr>
nnoremap gl :vsc ReSharper.ReSharper_GotoRecentFiles<cr>
nnoremap <C-t> :vsc ReSharper.ReSharper_TypeHierarchy_Browse<cr>
nnoremap K :vsc Edit.QuickInfo<cr>
nnoremap <C-k> :vsc ReSharper.ReSharper_InspectThis<cr>
nnoremap gk :vsc Edit.PeekDefinition<cr>
"show refactor menu
nnoremap crr :vsc ReSharper.ReSharper_RefactorThis<cr>
xnoremap <c-r><c-r> :vsc ReSharper.ReSharper_RefactorThis<cr>
nnoremap crn :vsc Refactor.Rename<cr>
nnoremap cri :vsc EditorContextMenus.CodeWindow.OrganizeUsings.RemoveAndSort<cr>
"show quickfix menu
nnoremap <bs> :vsc ReSharper_AltEnter<cr>
xnoremap <bs> :vsc ReSharper_AltEnter<cr>
" expression manipulation
nnoremap gst :vsc Edit.WordTranspose<cr>
nnoremap gsh :vsc ReSharper.ReSharper_MoveLeft<cr>
nnoremap gsl :vsc ReSharper.ReSharper_MoveRight<cr>
nnoremap gsk :vsc ReSharper.ReSharper_MoveUp<cr>
nnoremap gsj :vsc ReSharper.ReSharper_MoveDown<cr>
" evaluate F#
xnoremap <enter> :vsc EditorContextMenus.CodeWindow.ExecuteInInteractive<cr>
nnoremap yxx ggVG:vsc EditorContextMenus.CodeWindow.ExecuteInInteractive<cr>
nnoremap <enter> :vsc EditorContextMenus.CodeWindow.ExecuteLineInInteractive<cr>
nnoremap ]q :vsc Edit.GoToNextLocation<cr>
nnoremap [q :vsc Edit.GoToPrevLocation<cr>
nnoremap ]l :vsc Edit.NextHighlightedReference<cr>
nnoremap [l :vsc Edit.PreviousHighlightedReference<cr>
" 'omnibox'
nnoremap <space> :vsc Window.QuickLaunch<cr>
nnoremap <insert> :vsc Debug.ToggleBreakpoint<cr>
nnoremap [o<insert> :vsc Debug.EnableAllBreakpoints<cr>
nnoremap ]o<insert> :vsc Debug.DisableAllBreakpoints<cr>
nnoremap da<insert> :vsc Debug.DeleteAllBreakpoints<cr>
nnoremap @T :vsc TestExplorer.RepeatLastRun<cr>
nnoremap q; :vsc View.C#Interactive<cr>
nnoremap q: :vsc View.CommandWindow<cr>
nnoremap q[ :vsc TestExplorer.ShowTestExplorer<cr>
nnoremap q] :vsc View.ErrorList<cr>
nnoremap gof :vsc File.OpenContainingFolder<cr>
nnoremap got :vsc Tools.ExternalCommand2<cr>
" toggle 'Track Active Item in Solution Explorer' option
nnoremap cos :vsc View.TrackActivityinSolutionExplorer<cr>
" highlight active file in Solution Explorer (VS 2012+)
nnoremap ^ :vsc SolutionExplorer.SyncWithActiveDocument<cr>
nnoremap cow :vsc Edit.ToggleWordWrap<cr>