1

Topic: Mapping to a visual-studio / resharper command for insert mode only

Is it possible to map a key combination to a visual studio / resharper command directly in insert mode?  The only way I'm aware of for doing this is to go into command mode, then use the : vsc command.  I'm guessing this isn't possible.

I just ask because there are a few cases where this would be useful.  For example, you could preserve the behaviour of CTRL+A / CTRL+C / CTRL+V / CONTRL+X in insert mode without giving up their classic vim usage in normal mode.

2

Re: Mapping to a visual-studio / resharper command for insert mode only

Hi,
you can add something like this to _viemurc:

inoremap <c-v> <esc>:vsc Edit.Paste<cr>i

This will execute a paste command while in insert mode when pressing Ctrl+V, while preserving Ctrl+V's behavior in other modes. Hope this helps!

3

Re: Mapping to a visual-studio / resharper command for insert mode only

That gets us closer, but won't apply the operation to the highlighted text.  Is there a way to do that as well?