Before making the switch to Vim, I spent time in limbo using EMACS in viper mode (which is EMACS with vi emulation). Despite the vast improvements in most areas, there were a few things I missed from EMACS. One thing I really missed was the behavior of the . command, which always restored the cursor position.

and I wanted to change foo to bar. I would always use a cw and then the . command:

cwbar<CR>j.j.

rather than making a substitute command which would make me worry about the range over which it should take place etc.

When making the switch to Vim, I was disconcerted because after the first . my cursor was at the end of the second 'bar'.

In fact I pretty much always wanted this behavior from '.', so this mapping helped me out:

"make . not move the cursor
noremap . mz.`z

I've since noticed this is just a special case of the tip *restore-position* in the help manual, but it took me a while to find out how to do this. One other former emacs/viper user also was searching for this. Hopefully this tip makes it easier for the next person to find who finally finds their way out of EMACS.