Closed kiryph closed 6 years ago
Following definition works
map Y <Plug>(highlightedyank)$
Can you confirmm that this is the way to go?
BTW, there is also the plugin https://github.com/haya14busa/vim-operator-flashy
Yes, this is the best way, I think. I would better to add to README and/or doc. In fact, I just write like this in my vimrc since I'm lazy.
nmap Y y$
This is not strict/explicit but works even without highlightedyank.
P.S.
Yes, operator-flashy is a great plugin! In fact, I have employed it. Generally operator-flashy would be a cleaner implementation. However, it is strange to me that it is unintentionally repeated by .
command even without y
in cpoption
. In Vim, highlightedyank has some dirty hack to avoid this (issue #19 is caused by this). TextYankPost
autocommand event in neovim solves this problem, so I hope vim also had it.
Thanks for the information.
There is now a pending pull request for vim8 to add TextYankPost
: https://github.com/vim/vim/pull/2333.
Thanks! I can't wait!
What do I have to define in my vimrc to enable highlighting for
nnoremap Y y$
as suggested under:h Y
?