diff --git a/CHANGELOG.md b/CHANGELOG.md index bb6778a..17df652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file. - Tips: [Saner behavior of n and N](README.md#saner-behavior-of-n-and-n) - Tips: [Quickly move current line](README.md#quickly-move-current-line) - Tips: [Quickly add empty lines](README.md#quickly-add-empty-lines) +- Tips: [Quickly edit your macros](README.md#quickly-edit-your-macros) - Tips: [Don't lose selection when shifting sidewards](README.md#dont-lose-selection-when-shifting-sidewards) ## [1.0] - 2016-01-06 diff --git a/README.md b/README.md index 3ef315b..2cad313 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ - [Saner behavior of n and N](#saner-behavior-of-n-and-n) - [Quickly move current line](#quickly-move-current-line) - [Quickly add empty lines](#quickly-add-empty-lines) +- [Quickly edit your macros](#quickly-edit-your-macros) - [Don't lose selection when shifting sidewards](#dont-lose-selection-when-shifting-sidewards) #### [Debugging](#debugging-1) @@ -382,6 +383,18 @@ nnoremap [ :put! ='' nnoremap ] :put ='' ``` +#### Quickly edit your macros + +This is a real gem! The mapping takes a register (or `*` by default) and opens +it in the cmdline-window. Hit `` when you're done editing for setting the +register. + +I often use this to correct typos I did while recording a macro. +```viml +nnoremap m :='let @'. v:register .' = '. string(getreg(v:register)) +``` +Use it like this `m` or `"qm`. + #### Don't lose selection when shifting sidewards If you select one or more lines, you can use `<` and `>` for shifting them