Highlight the put text!
Vim 8.1.1084 or later.
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)
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).
let g:highlightedput_highlight_duration = 500 " default
highlight link HighlightedputRegion DiffAdd " default
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.