Skip to content

obcat/vim-highlightedput

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 vim-highlightedput

CI MIT License

Highlight the put text!

vim-highlightedput-demo

Requirements

Vim 8.1.1084 or later.

Usage

Define these key mappings in your vimrc.

nmap p <Plug>(highlightedput-p)
xmap p <Plug>(highlightedput-p)
nmap P <Plug>(highlightedput-P)
xmap P <Plug>(highlightedput-P)
nmap gp <Plug>(highlightedput-gp)
xmap gp <Plug>(highlightedput-gp)
nmap gP <Plug>(highlightedput-gP)
xmap gP <Plug>(highlightedput-gP)
nmap ]p <Plug>(highlightedput-]p)
xmap ]p <Plug>(highlightedput-]p)
nmap [P <Plug>(highlightedput-[P)
xmap [P <Plug>(highlightedput-[P)
nmap ]P <Plug>(highlightedput-]P)
xmap ]P <Plug>(highlightedput-]P)
nmap [p <Plug>(highlightedput-[p)
xmap [p <Plug>(highlightedput-[p)
nmap zp <Plug>(highlightedput-zp)
xmap zp <Plug>(highlightedput-zp)
nmap zP <Plug>(highlightedput-zP)
xmap zP <Plug>(highlightedput-zP)

Concept

Just add highlight. Anything else should be exactly the same as buitin put commands.

  • Works fine with a count and/or a register specification.
  • Dot-repeatable (with highlight).

Customizing

Highlight duration

let g:highlightedput_highlight_duration = 500  " default

Highlight group

highlight link HighlightedputRegion DiffAdd  " default

Acknowledgments

Thanks to @tm9d for creating atom-vim-mode-plus. The project told me that the put operation with highlight is so exciting and inspired me to write this plugin.

Also thanks to @machakann for creating vim-highlightedyank and vim-highlightedundo plugin. The name "vim-highlightgedput" is inspired by the plugins, and he kindly agreed to let me use this name. Also a lot of code is based on the plugins, thank you.

License

MIT License

About

🌟 Highlight the put text!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published