Tip8: Chunk Your Undos
January 12, 2021 · View on GitHub
The u key triggers the undo command, which reverts the most recent change.
i{insert some text}<Esc> key.
If I’m in Insert mode with my cursor at the end of a line, the quickest way to open a new line is to press <CR>. And yet I sometimes prefer to press <Esc>o just because I anticipate that I might want that extra granularity from the undo command.
Moving Around in Insert Mode Resets the Change
When I said that the undo command would revert all characters entered (or deleted) during a trip into Insert mode and back, I was glossing over a small detail. If we use the