mirror of
https://github.com/tpope/vim-repeat.git
synced 2026-09-10 07:16:26 -04:00
Added an example
This commit is contained in:
parent
ae361bea99
commit
96ee3e3df7
|
|
@ -19,6 +19,30 @@ command at the end of your map functions.
|
|||
|
||||
silent! call repeat#set("\<Plug>MyWonderfulMap", v:count)
|
||||
|
||||
## Example
|
||||
|
||||
This mapping:
|
||||
|
||||
```
|
||||
nmap cp xp
|
||||
```
|
||||
|
||||
Has the same effect than this:
|
||||
|
||||
```
|
||||
nmap <Plug>TransposeCharacters xp
|
||||
nmap cp <Plug>TransposeCharacters
|
||||
```
|
||||
|
||||
To make it repeatable do this:
|
||||
|
||||
```
|
||||
nmap <Plug>TransposeCharacters xp
|
||||
nmap cp <Plug>TransposeCharacters
|
||||
silent! call repeat#set("\<Plug>TransposeCharacters", v:count)
|
||||
```
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Install using your favorite package manager, or use Vim's built-in package
|
||||
|
|
|
|||
Loading…
Reference in a new issue