RFC: Temporarily highlight yanked range in Vim mode

Review Request #109372 - Created March 9, 2013 and submitted

Simon St James
This isn't something I'm planning to submit necessarily, but it's something I'd like some feedback on :)

I quite often mis-yank (so to speak) in Vim, especially when doing something semi-complex like "yank up until 2nd closing bracket" or somesuch, and there's no feedback about what I've yanked until I come to paste.  This patch adds a temporary highlight that shows the last yanked range.  The highlight disappears on the next keypress.

I've used it for a while, and *quite* like it, but was wondering what other Vim'ers thought of it!

Also, there's a bit of ugliness due to the fact that both Normal and Visual mode will have their own m_highlightedYank, when we only want one m_highlightedYank per view: any ideas on how to make this less hack-ish? Probably the best way to do this would be to make Visual Mode not inherit from Normal mode, but that would be a pretty huge undertaking ;)

Also also, what's the best way for writing automated tests for this? I need some way of telling whether a give region of the current view has a particular highlight or not.




  • 1
  • 2
  • 0
  • 3
Description From Last Updated
How long do the yank ranges live? If there is a timeout? If there is a timeout, caching should not ... Dominik Haumann Dominik Haumann
Fabian Kosmale
Erlend Hamberg
Dominik Haumann
Simon St James
Simon St James
Dominik Haumann
Commit Hook
Simon St James
Review request changed

Status: Closed (submitted)