Skip to content

please add a concrete example #55

Description

@jabbalaci

By reading the README it was not clear to me how to use this plugin. Using this screencast (http://vimcasts.org/episodes/creating-repeatable-mappings-with-repeat-vim/) I managed to figure out how it works. Here is a concrete example, I think it would be a good idea to add it (or something similar) to the README:

before

nnoremap <Leader>' viw<esc>a'<esc>hbi'<esc>lel

It surrounds the current word (manual solution).

after

nnoremap <silent> <Plug>SurroundWordWithApostrophe  viw<esc>a'<esc>hbi'<esc>lel
    \ :call repeat#set("\<Plug>SurroundWordWithApostrophe", v:count)<cr>
nmap <Leader>'  <Plug>SurroundWordWithApostrophe

Now it's repeatable with the "." command.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions