Redo and undo are important features to automate repeated commands and save a lot of time. For example open a new file and type “vim text editor” ended by a newline character. This insertion of text shall be repeated. Use the dot (.) to redo insert actions. Each time when pressing the key, a new line with “vim text editor” shall be appended.
The “u” key does the opposite: It undoes actions. Each time pressing the key, a line with the text should disappear.
| u | undo |
| <Ctrl>r | redo |
| ; | Redo search command |
| , | Redo search command in other direction |
| U | undo all operations of current line (don’t leave the line!) |
| J | Put 2 lines together |
| ~ | Current character: change upper/lowercase |
| x | delete character at cursor position |
| X | delete character after cursor position |
| xp | transpose – “Windows” + xp = “iWndows” |
| . | repeat command |
| Ctrl+@ | repeat command, but no deletion |
Recent Comments