3

I want to use r# and vsvim to go to implementation in visual studio. Like command "gd", but maybe "gi".

Can i do it?

  • By the way, is there an advantage to using the R# `Resharper.Resharper_GotoImplementation` over the VS built-in `Edit.GoToImplementation`? – Julien Couvreur Jul 07 '16 at 11:16

2 Answers2

6

Yes, you can.

Assuming that you already have a vsvimrc customization file, you just need to add:

map gi :vsc Edit.GoToImplementation<CR>

FYI my full vsvimrc is here, with many other tricks, such as:

map gk :vsc Edit.PreviousMethod<CR>
map gj :vsc Edit.NextMethod<CR>
map gr :vsc Edit.FindAllReferences<CR>
map <Leader>k :vsc Window.PinTab<CR>
noremap + :vsc Edit.CommentSelection <return>
noremap - :vsc Edit.UncommentSelection <return>
Jon49
  • 4,444
  • 4
  • 36
  • 73
Julien Couvreur
  • 4,473
  • 1
  • 30
  • 40
  • 1
    this is awesome. It is so шикарно! –  Jul 06 '16 at 10:56
  • Where did you get the list of Edit commands? I can't seem to find them anywhere on the internet. – Jon49 Jun 05 '18 at 16:53
  • 1
    You can find the list of commands in the VS keyboard settings. The information is also available in text format (but not up-to-date with latest VS): http://weblogs.asp.net/scottgu/visual-studio-2010-keyboard-shortcuts – Julien Couvreur Jun 06 '18 at 22:06
  • I had no idea you can do this.... Thanks for opening my eyes – knile Nov 25 '22 at 22:57
2

Yes, you can! And it's exactly what I am doing. This is the relevant line from my _vsvimrc file: nnoremap gi :vsc Resharper.Resharper_GotoImplementation<CR>

Here are some other mappings you might find useful when using VsVim and R# together: nnoremap gi :vsc Resharper.Resharper_GotoImplementation<CR> nnoremap ge :vsc Resharper.Resharper_GotoNextErrorInSolution<CR> nnoremap gh :vsc Resharper.Resharper_GotoNextHighlight<CR> nnoremap gm :vsc Resharper.Resharper_GotoFileMember<CR> nnoremap gu :vsc Resharper.Resharper_UnitTest_RunSolution<CR> nnoremap gr :vsc Resharper.Resharper_Resharper_UnitTest_RunContext<CR> nnoremap g2 :vsc Resharper.Resharper_Resharper_UnitTest_DebugContext<CR> nnoremap gU :vsc Resharper.Resharper_ShowUnitTestSessions<CR><C-F4>

Thomas Svensen
  • 760
  • 1
  • 7
  • 14