Closed zdrazil closed 3 years ago
Using https://github.com/machakann/vim-highlightedyank together with this plugin by using the following in .vimrc (notice that autocmd part is the same as in README.md:
.vimrc
autocmd
README.md
call plug#begin('~/.vim/plugged') Plug 'ojroques/vim-oscyank' Plug 'machakann/vim-highlightedyank' call plug#end() autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '+' | OSCYankReg + | endif
breaks vim-highlightedyank functionality. If you press yy, the yank is no longer highlighted.
vim-highlightedyank
yy
And if you use the first example from the README.md:
autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '' | OSCYankReg " | endif
the highlight no longer works when you press "+yy.
"+yy
Looks like it could be a similar issue as described here: https://vi.stackexchange.com/questions/13454/endif-treated-as-part-of-command-in-autocmd. The endif gets swallowed.
endif
Found two possible fixes:
:h command-bar
execute
I've went with the second option, because I'm not sure what the first option could break and if it would be backwards compatible.
Looks good to me. Thank you very much :)
Happy to help :)
Using https://github.com/machakann/vim-highlightedyank together with this plugin by using the following in
.vimrc
(notice thatautocmd
part is the same as inREADME.md
:breaks
vim-highlightedyank
functionality. If you pressyy
, the yank is no longer highlighted.And if you use the first example from the
README.md
:the highlight no longer works when you press
"+yy
.Looks like it could be a similar issue as described here: https://vi.stackexchange.com/questions/13454/endif-treated-as-part-of-command-in-autocmd. The
endif
gets swallowed.Found two possible fixes:
:h command-bar
execute
.I've went with the second option, because I'm not sure what the first option could break and if it would be backwards compatible.