diff --git a/help/vim.md b/help/vim.md index c4af46d7..3fd664a7 100644 --- a/help/vim.md +++ b/help/vim.md @@ -229,12 +229,20 @@ Macros are used for complex commands that can't be repeated with `.`. They help - If you want to end the macro in insert mode, press `` then `q`. - Play back a previously recorded macro: `@ + ` - To repeat the last macro played, simply use `@@`. +- Repeat a macro on all lines: `:%norm! @` + - To repeat a macro on only a specific set of lines, use: `:,norm! @` + - From line 5 to the end of the file: `:5,$norm! @` + - Repeat a macro on all lines matching a pattern: `:g/pattern/norm! @` ## Marking Things - Mark the current line: `m + ` - Go to a previously marked line: `' + '` - Go to a previously marked line, exactly where you were before: ``` + `` +- Jump to the previous cursor position: `''` +- Jump to the previous cursor position, exactly where you were before: `` ` `` + `` ` `` +- Jump to the previous edit location: `g;` +- Jump to the next edit location: `g,` ## Indenting Things