Re: ViEmu 2.0 finally available

Hello everyone,

Version 2.0 is finally available. It fixes many old shortcomings, implements a lot of new features, and you can just download it from the main page:


Here are the release notes on the new version, detailing every improvement it brings. You can see them in a nicer html format here:


All in all, I am very happy about releasing this new version. I hope 2.0 will help make your daily work more enjoyable and productive.

Best regards,


ViEmu 2.0 features:


* hlsearch
* Proper vim-like visual area representation
* Proper undo-grouping of operations (cw...)
* Proper Intellisense-autocompleted input repetition
* Automatic VS keybinding management
* Advanced mapping support (":cmap <c-p> <up>", ":map \\ /xkz<esc>"...)
* Buffer number commands :ls, :b[uffer] <n>, :bn[ext]/:bp[revious]
* Proper wordwrapping support, better and faster folding support
* Better incremental search, works also in visual mode


* Macros stored in regular registers
* a..z marks local and A..Z global
* Proper autoindent when repeating input
* Cursor kept on screen in <c-e>/<c-y>
* Proper <c-f>/<c-b>/<c-d>/<c-u> which always scroll
* Proper iw/iW/ib/iB/i)/i}/i>/i] and a*... emulation
* Proper block selections in the presence of folds/wordwrapping
* 'o' command in visual mode
* :delmark command
* :xa[ll] :wqa[ll] commands
* :vsc[md] command to trigger any VS command
* Count support for the | motion
* gJ implemented (join w/o adding spaces)
* gS implemented (convert current visual range in Visual Studio selection)

* zR now works properly
* J/:j now properly emulate the behavior of vim regarding spacing


* hlsearch
ViEmu will highlight all matches of the latest search in the current
buffer...  invaluable.  When you switch to another buffer, it will
also be scanned. If you're handling huge files, it may impact
performance, so you can disable it with :set nohlsearch or in

* Proper vim-like visual area representation
ViEmu 1.x used Visual Studio's selection to represent the selected
visual mode area. This had limitations, such as not being able to show
the cursor inside the selection (which happens often in visual-lines
mode). ViEmu 2.0 uses custom text markers to faithfully emulate how
visual selection looks in vim. Much clearer. Anyway, it can be turned
off if you need to preserve the previous behavior.

* Proper undo-grouping of operations
Many actions in ViEmu 1.x were not grouped for undo in the same way as
in vim.  For example, issuing a 'cw' and then typing some text plus
presing <Esc> would be undone in two steps: one for the erasing of the
word, and another one for the typing. If the typing involved newlines,
there would be even more steps.  This was necessary because
Intellisense doesn't allow regular undo-group wrappers around its
actions. ViEmu 2.0 uses a more ellaborate mechanism to group undo
actions, which allows proper grouping of any operation. You can see
the markers ViEmu inserts in the undo queue as '---', and u/^R will
use those to determine which actions to undo.

* Proper Intellisense-autocompleted input repetition
Typing some text and then repeating it (most often with '.', but also
possibly with a count prepended to the input command or using I or A
in visual-block mode) would not work fine if you had used Intellisense
in the input session.  This is because Intellisense input does not go
through standard input mechanisms.  ViEmu 2.0 watches the changes made
to the buffer to Intellisense and then deduces what sequence of typing
best emulates what has been done. This results in faithful repetition
of Intellisense completed input.  Since the actions of each language's
Intellisense are different and can be pretty weird, especially for VB,
there might be some case in which it doesn't work fine - please let me
know about the specific case so that I can fix it. It's been tested
extensively with C++, VB.NET, C# and J#. I am aware that it doesn't
work great with HTML (automatic closing tags), I plan to address it
in a future release, please let me know if it is very urgent to you.

* Automatic VS keybinding management
Any keybinding assigned through Visual Studio's Tools|Options|Keyboard
mechanism is invisible to ViEmu, as Visual Studio 'swallows' the key
press message before even dispatching it to the editor's window.
ViEmu 1.x required manually removing keybindings clashing with
standard vi/vim commands. Now, ViEmu 2.0 will scan the keyboard
assignments the first time it is run, and remove them itself. It will
also remember them, so that they can be restored when ViEmu is
disabled by using <Ctrl-Shift-Alt-V> or through the preferences page.
There is a keyboard manager accessible from Tools|Options|ViEmu ->
Keyboard that allows you to configure the behavior, clear the list,
rescan the assignments, configure which vi/vim keybindindings are
considered for clashes, etc...

* Advanced mapping support
ViEmu 1.x had very minimal single-character-to-single-character
mapping support. ViEmu 2.0 implements all of vim's mapping options
with the single exception of multiple-key-chords on the left hand
side. As an example, you can map <C-N> and <C-P> in command-line
editing mode to act as the up and down arrows:

   :cmap <c-n> <down>
   :cmap <c-p> <up>

You can use 'c-', 's-' and 'a-' for Ctrl, Shift and Alt, or any
combination thereof.  The documentation has all the details on the
supported contexts, etc...

* Buffer number commands
ViEmu 2.0 keeps the list of buffers it has been exposed to and assigns
numbers to them, in the same way as vim. You can use :ls to list the
buffers, :b[uffer] {N} to go to a given buffer, and
:bn[ext]/:bp[revious] to navigate the buffers in this order.

* Proper wordwrapping support, better and faster folding support
Several actions in ViEmu 1.x didn't act well with word wrapping turned
on: <C-E>/<C-Y>, H/M/L, etc... these all work great in ViEmu 2.0, and
there is also an option in Tools|Options|ViEmu to turn on
"Windows-like wrapped text navigation", so that j/k move up and down
within wrapped pieces of the same line.  Folding support has also been
improved, being much faster when working with large files (it could
become a bit slow in ViEmu 1.x), and with proper representation for
all visual submodes (both for wrapped text and for folded text).

* Better incremental search, works also in visual mode
The new incremental search uses a separate custom text marker, so it
is visible even in visual mode.

* Macros stored in regular registers
Macro registers were separate from regular registers in previous
versions. In ViEmu 2.0, macros recorded with 'q' are stored in and
played from the regular text registers. You can record a macro and
paste it with "xp to see the keystrokes, or yank some text from
anywhere and play it with @.

* Proper autoindent when repeating input
As a result of the undo-grouping and the smart-Intellisense-sensing
behavior, now input which includes newlines will be properly repeated
anywhere with newly-calculated smart-indenting behavior.


Re: ViEmu 2.0 finally available

This is great - I've been looking forward to this:)

Thanks for the hard work, J.

Best regards!


Re: ViEmu 2.0 finally available

Thanks to you for the praises. I'm right now checking that everything is fine, there are no broken links, etc... and I'll send an e-mail out to all existing users to notify them about the release.


Re: ViEmu 2.0 finally available

Awesome! I'm installing at the moment - can't wait to try it out.



Re: ViEmu 2.0 finally available

Thank you for a release.
I tried it now.
There is one problem.
VS2005 crashes when gS is pushed in the normal mode.


Re: ViEmu 2.0 finally available

Hello snt,

Thanks for reporting this. gS was actually added very late in the 2.0 cycle, to ease compatibility with other add-ins. I will fix that and let you know as soon as it is working fine (ie, not doing anything in normal mode).

Best regards and thanks for taking the time to let me know about this,



Re: ViEmu 2.0 finally available


I have fixed the gS crash, together with a few :s misbehaviors, and uploaded 2.0.24 (just download the latest version from download.html to get it, the filename is still ViEmu20.msi). It's necessary to manually uninstall the previous 2.0 version before installing this one.




Re: ViEmu 2.0 finally available

Hi, jon
A new version doesn't crash.  Thank you for the very good tool.


Re: ViEmu 2.0 finally available

Just noticed 2.0 was out, and installed it.

Only used for 30 mins so far, but I really love that C-f and C-b are "proper" now. Much easier to follow the scrolling somehow. Of course, Intellisense working is fantastic too. I'll have to unlearn _not_ pushing enter when I'm going to use '.', since I had to not do that in the old versions though. :)

One minor bug that I believe is new in going from 1.4x to 2.0 (could be wrong, might just never have noticed before). The "sticky" horizontal cursor position isn't updated when changing the cursor position with the mouse. So, if I'm in the middle of a line, I can move up and down with j/k, and the cursor correctly either goes to the end of the line, or the old horizontal position. But, if I click on another line at a different horizontal position, and then move up and down, the sticky position is the last horizontal position that I moved using vi-type movement commands.

Overall seems like a nice step forward. I'll start pimping to friends more often now. :)


(PS. I wrote a free little addin for VS2005 called VsWhiz that complements ViEmu. It's an Incremental File Open dialog, which I bind to Ctrl-Enter when using ViEmu. Check it out at http://h4ck3r.net/)


Re: ViEmu 2.0 finally available

Scott, thanks a lot for the kind comments. I will look into the "desired cursor col" problems and let you know as soon as I have a fix. Thanks for reporting about it, and I'll certainly have a look at VsWhiz!