In command mode, r can also be useful in some circumstances. It allows you to replace one character under the cursor.
Usually I often use r Space to remove a character in a string without changing the indent or alignment.
For example, if you have the following code:
var anotherOne = NULL; var short1 = NULL; var veryLongLong = NULL;
using r Space in '1', now you have:
var anotherOne = NULL; var short = NULL; var veryLongLong = NULL;
instead
var anotherOne = NULL; var short = NULL; var veryLongLong = NULL;
In the latter case, you must switch to insert mode to add another space.
Xavier T.
source share