Skip to content

EgZvor/vimproviser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vimproviser

Vimproviser was designed to repeat motions.

Vimproviser provides commands and mappings that allow for a quick remapping of two of your most convenient keys to actions that are most important for you right now.

Quick start

Map some convenient keys to Vimproviser mappings

nmap h <plug>(vimproviser-left)
nmap l <plug>(vimproviser-right)

Run the command to choose situational mappings for h and l

For example:

:VimproviserMap QuickFix

will remap h to :cprevious<cr> and l to :cnext<cr>.

Try other arguments

" :bprevious and :bnext
:VimproviserMap Buffers
" @h and @l -- improvise away!
:VimproviserMap Macros
" h and l -- boooring
:VimproviserMap Characters

Use <c-d> (:h cmdline-completion) to see all available options.

Triggers

Triggers are just actions connected to some pair. VimproviserLast will perform an equivalent of VimproviserMap Pair for the last pair that was triggered. Define a bunch of triggers for pairs:

let g:vimproviser_triggers = {
\    'Changes': ['g;', 'g,'],
\    'Characters': ['<left>', '<right>'],
\    'Macros': ['@h', '@l'],
\}

Now imagine you need to go deep into the changes you made recently, hit g; as usual, then VimproviserLast, now you can use h and l to go back and forth.

Read the documentation in :h vimproviser-quick-start.

Video showcase

Thumbnail of a video with the text saying Vimprovise, adapt, overcome. Vim logo is placed on top of the beginning of the first word. There are gray rocks in the background.

Other plugins

Vimproviser is partly inspired by unimpaired.vim. They work together nicely!

About

Map `h` and `l` on the fly!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published