That said, the beauty of vim (and I'm assuming emacs as well) is that with the macro facilities, you are basically writing small programs to manipulate your source code, interactively. Let's say I want to convert some markdown into HTML using vim. Let's create the following source code (using whatever method you want):
* List item 1
* List item 2
* List item 3
* List item 4
We want to transform it to: <ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ul>
(Let's ignore the fact that the trailing </li> is unnecessary.) Open up the initial file in vim, and press the following keys (note that <ESC> indicates the Escape key, but all other key presses are literal, including the two spaces before <li>): ggO<ul><ESC>qqj^2s <li><ESC>A</li><ESC>q3@qo</ul><ESC>
gg - start from the top (not necessary if we're already there)O - enter a new line above current line and enter Insert mode
<ul><ESC> - enter some text
qq - begin recording all keystrokes into register "q" (here is the "writing small program" part that I mentioned)
j^ - move down and to the beginning of the next line
2s - erase two characters, entering insert mode
<SPACE><SPACE><li><ESC> - enter some more text
A - move to the end of the current line and enter insert mode
</li><ESC> - enter some more text
q - stop recording
3@q - perform the keystrokes recorded in register "q" 3 times (run our "small program" 3 times). This step always makes me smile, because seeing such complex changes to a large piece of code with just a few keystrokes seems almost magical
o - enter Insert mode after the current (last) line
</ul><ESC> - enter some more text. Note: you may need to press Ctrl-d before typing </ul> if you have autoindent turned on, in order to decrease the indent
Task completed. That is a somewhat trivial example, but it's a small taste of something that no editor without keyboard macros -- and the power to control everything with keystrokes -- could ever accomplish.
It also showcases 4 different methods (O, s, A, o) for entering Insert mode (none of them being the typical i), all of them useful in their own right. These are the types of things I miss when using emacs (without viper-mode).