Skip to content

lilydjwg/vim-highlightedyank

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-highlightedyank

Make the yanked region apparent!

Usage

If you are using Vim,

add the line into your vimrc.

map y <Plug>(highlightedyank)

If you are using Neovim,

there is no need for configuration, as the highlight event is automatically triggered by the TextYankPost event.

Optimizing highlight duration

If you want to optimize highlight duration, use g:highlightedyank_highlight_duration or b:highlightedyank_highlight_duration. Assign number of time in milli seconds.

let g:highlightedyank_highlight_duration = 1000

If a negative number is assigned, the highlight would get persistent.

let g:highlightedyank_highlight_duration = -1

When a new text is yanked, the old highlighting would be deleted. Or when former lines are edited, the highlighting would be deleted to prevent shifting the position, also.

Highlight coloring

If for some reason the highlight is not visible you can redefine the HighlightedyankRegion highlight group like so:

hi HighlightedyankRegion cterm=reverse gui=reverse

Demo

vim-highlightedyank

About

Make the yanked region apparent!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 98.5%
  • Other 1.5%