vsvimguide
vsvimguide copied to clipboard
Resharper inline rename function does not accept vsvim keystrokes
Visual Studio 2022
When I invoke the Resharper.Rename on a local function variable, rather than showing the dialogue that always worked, it switches to an inline editor that does not allow any vim keystrokes. This inline editor used to accept vsvim keystrokes somewhat, but recently has completely stopped working for me.
Is this a bug?
Is there something to configure to make it work?
Is there a way to just always show the rename dialogue?
Thank you for any replies.
Hi, I'm not too sure, I've used Rider almost exclusively for many years now which has fantastic Vim support via Jetbrains Vim emulation plugin.
Thanks for the reply. As I happen to have a Rider license, I have elected to resolve my editing problems there.
Visual Studio 2022 will now get relegated to just a being debugger. I'm not moving away from vim just for Microsoft.
The years of vsvim in Visual Studio have been amazing and the only reason I could tolerate editing in Visual Studio.
cool, this was my motivation initially.
Not sure if you are new to Riders Vim plugin, but FYI, this is what I have configured in Riders .ideavimrc ( which I put on my dropbox drive and source it from the default .ideavimrc)
I also have the plugins (vim related )
IdeaVim (of course) Which-Key IdeaVim-Sneak IdeaVim-EasyModtion and AceJump ( which have to go together, I actually don't use it a lot... )
set ignorecase
set clipboard=unnamed
set clipboard+=ideaput
set ideajoin
let mapleader = " "
set number
set relativenumber
set showmode
set hlsearch
set notimeout
set visualbell
" Plugins (order matters!)
set easymotion
set NERDTree
set exchange
set sneak
set surround
set which-key
let g:WhichKey_FontSize = 16
let g:WhichKey_ShowVimActions = "true"
" Plug VimScript Plugins
Plug 'tommcdo/vim-exchange'
Plug 'terryma/vim-multiple-cursors'
" KEY MAPPINGS
" Note: if you are still using :action something<CR>
" The new way is to use <Action>(something)
" you can use the following vim search replace to swap to this new way
" :%s/:action \(.*\)<CR>/<Action>(\1)/g
" see discussion here https://github.com/JetBrains/ideavim/discussions/303#discussioncomment-4507624
" Misc
map <Leader>h :noh<CR>
map <Leader>p :put<CR>
map <Leader>P :put!<CR>
" Reload this file into IdeaVim, useful after you have made changes"
map <Leader>zl :so ~/.ideavimrc<CR>
" Edit the .ideavimrc, This is the actual ideavimrc file, the rc above just sources the dropbox one"
map <Leader>ze :e ~\\Dropbox\\.ideavimrc<CR>
" This will load the current file into gvim, useful for cases where IdeaVim is just not quite vim enough
map <Leader>zv :!gvim %<CR>
" This is a bunch of other peoples ideavimrcs that are worth looking at
map <Leader>zo :!start https://github.com/JetBrains/ideavim/discussions/303<CR>
map <Leader>zt :!start pwsh<CR>
" In Visual Mode, keep the selection when indenting / unindenting
vmap < <gv
vmap > >gv
" Code Gen / Manipulation
map <Leader>sw <Action>(SurroundWith)
map == <Action>(ReformatCode)
map <Leader>i <Action>(NewElementSamePlace)
map <leader>xd <Action>(NewDir)
map <leader>xf <Action>(NewFile)
" Redo
nnoremap U <C-r>
" Navigation
map <Leader>u <Action>(FindUsages)
map <Leader>l <Action>(RecentLocations)
map <Leader>f <Action>(NERDTree)
map <Leader>F <Action>(Find)
map <Leader>H <Action>(Replace)
map <C-k> <Action>(MethodUp)
map <C-j> <Action>(MethodDown)
" Multi Cursor
map H <Action>(SelectNextOccurrence)
map L <Action>(SelectAllOccurrences)
map <C-n> <Plug>NextWholeOccurrence
map <C-S-k> <Action>(CloneCaretAboveWithVirtualSpace)
map <C-S-j> <Action>(CloneCaretBelowWithVirtualSpace)
" Build debug
map <Leader>b <Action>(BuildSolutionAction)
map <Leader>g <Action>(Run)
map <Leader>dd <Action>(Debug)
nmap <leader>ds <Action>(Stop)
nmap <leader>df <Action>(ChooseDebugConfiguration)
nmap <Leader>de <Action>(EditBreakpoint)
nmap <leader>dr <Action>(Debugger.RemoveAllBreakpoints)
nmap <leader>dt <Action>(ToggleLineBreakpoint)
nmap <leader>dv <Action>(ViewBreakpoints)
" Errrors
map <Leader>e <Action>(ReSharperGotoNextErrorInSolution)
map <Leader>E <Action>(ReSharperGotoPrevErrorInSolution)
" Refactoring
map <CR> <Action>(ShowIntentionActions)
map <C-r> <Action>(Refactorings.QuickListPopupAction)
map <Leader>rt <Action>(Refactorings.QuickListPopupAction)
map <Leader>rm <Action>(ExtractMethod)
map <Leader>rv <Action>(IntroduceVariable)
map <Leader>n <Action>(RenameElement)
map <Leader>o <Action>(Move)
" Testing
map <Leader>tc <Action>(Rider.UnitTesting.RunContext)
map <Leader>tt <Action>(RiderUnitTestRunContextAction)
map <Leader>td <Action>(RiderUnitTestDebugContextAction)
map <Leader>ts <Action>(RiderUnitTestRunSolutionAction)
map <Leader>tf <Action>(RiderUnitTestSessionRerunFailedTestsAction )
map <Leader>tp <Action>(RiderUnitTestRepeatPreviousRunAction)
" Views
map <Leader>vs <Action>(ActivateServicesToolWindow)
map <Leader>vn <Action>(ActivateNotificationsToolWindow)
map <Leader>va <Action>(ActivateAIAssistantToolWindow)
map <Leader>vu <Action>(ActivateUnitTestsToolWindow)
map <Leader>vd <Action>(ActivateDatabaseToolWindow)
map <Leader>vt <Action>(ActivateTerminalToolWindow)
map <Leader>m <Action>(HideAllWindows)
map <Leader>M <Action>(HideSideWindows)
" Git
" Distraction Free Modes
map <Leader>vz <Action>(ToggleZenMode)
map <Leader>vf <Action>(ToggleDistractionFreeMode)
map <Leader>vp <Action>(TogglePresentationMode)