Detailed features
If you want to have a look at every single feature that ViEmu implements, have a look online at the documentation. As a short sample of supported behavior you can expect:-
General command input including operators, counts, and register specifiers with
their original behavior:
- 2d3w (delete 6 words)
- d2j (delete this line and the next two)
- c2t) (change the text up to the second closing parenthesis)
- "ay2w (copy two words to register "a")
- 2"aP (paste the contents of register "a" twice before current pos)
- viBp (enter visual selection mode, select the current "{}" block, and paste over it)
-
General ex operations:
- :g/^/m0 to reverse the order of lines in the file
- :%s/\s\+$// to remove all trailing whitespace in the file
- :g/^$/d to remove all empty lines
-
Many other advanced features:
- hlsearch
- macros
- keyboard mapping
- Automatic removal of clasing VS keybindings
Integration with Visual Studio
ViEmu integrates seamlessly with the Visual Studio development environment. When you open a source code or text file, ViEmu steps in and provides vi/vim emulation within the newly opened text editing window. The status bar also shows the current ViEmu mode ("normal", "input", etc...), as well as the partial command input until now.Intellisense works within ViEmu editing windows in the same way as with the regular Visual Studio code editor, so you actually get the best of both worlds.
Visual Studio key mappings are available even in ViEmu editing windows, so you can use its commands to move around. If a ViEmu key and a Visual Studio keybinding clash, Visual Studio has precedence. So, if you want to use, for example, C-D in order to scroll down, you need to unassign it from any Visual Studio command.
ViEmu supports both the vi/vim input model (mostly all NORMAL mode commands, as well as vim's exclusive and very useful VISUAL mode), and the ex command line.
ViEmu works with any type of Visual Studio recognized language, with all the IntelliSense and autocompletion features. It has been tested with C++, C# and Visual Basic code.
Apart from that, ViEmu tries to address the most common input inconvenience of vi/vim. In vi/vim, if you accidentally hit the Caps Lock key, and then start keying in commands, things behave in a weird way. For example, you may press 'i' believing that you will be entering text at the current position, only to find that the cursor moves over to the first non-blank character in the line. In order to prevent this, and given that using Caps Lock with commmand input seems of little use, there is an option to ignore the state of Caps Lock for commands. When the option is activated, ViEmu looks at whether the Shift key is pressed instead of paying attention to the caps lock key, and does the right thing. If you accidentally activate caps lock, you will harmlessly notice it only when you start entering text, which is a very minor nuisance.