1

Re: Ctrl-V to paste - undo history / macro recording

I know that you can use "ctrl-r then *" to paste from the clipboard.  However, in general use I (most people??) use ctrl-v to paste.  As ctrl-v isn't registered into viemu's undo history, it can sometimes cause havok when undoing.  To the point where I've actually lost date because of it.  This also applies for macros (although, I do make a concious effect to use ctrl-r and * when recording a macro).

Is there any way I can get ctrl-v to be stored as part of viemu's undohistory/macrorecording?

Cheers,
Dan.

2

Re: Ctrl-V to paste - undo history / macro recording

Have you tried remapping <C-v> to <C-r>* ?

3

Re: Ctrl-V to paste - undo history / macro recording

Yep.  Doesn't make a difference.

4

Re: Ctrl-V to paste - undo history / macro recording

Dan,

Can you please explain in more detail what edition of ViEmu and host environment you are talking about? The different versions of Visual Studio, SQL Server, Word and Outlook can make a big difference. Also, any other third-party add-ins installed may influence this, so that information would be useful too.

ViEmu does make a serious effort to try to maintain proper undo histories in the presence of internally-initiated operations (any vi/vim command emulated by ViEmu, like <Ctrl-R>*), but also when they are intermixed with externally-initiated operations (<Ctrl-V> for paste, but also dragging text with the mouse, or using any editing op from the app's menu). Of course, there may be a problem with this logic, and I'd be happy to look into it.

Regards,

  -- Jon

5

Re: Ctrl-V to paste - undo history / macro recording

Hi.  Really sorry so long to reply (so very long!).  I had missed your reply, then forgotten about it.  However it still is an issue.  I'm using VisualStudio 2005 on Windows7.  I've only just started using Windows7 though, and saw the same problems on XP.

If I highlight and ctrl-v some text during a record operation, then it doesn't include that when replaying the macro.

6

Re: Ctrl-V to paste - undo history / macro recording

Ah ok, now I understand. It's not about undoing, but about being recorded in a macro.

I believe most vi(m)ers use other things than Ctrl-V to paste, so it's not an issue in most cases.

If you want to record it, you should unbind Ctrl-V from VS's Edit.Paste (go to Tools|Options|Keyboard), so that ViEmu will receive the keypress, and then map it to Ctrl-R * using ViEmu.

Unfortunately, I can't see any sensible way to handle VS's stock Ctrl-V paste functionality so that it will be recorded in a macro. They are just things from "different worlds". Hope the remapping tip will help!

Regards,

  -- Jon