We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I wanted y and friends to do their regular function but also OSC yank the same text.
y
It seemed to me that I should have been able to do it with the provided operator but I could concoct a solution that way so I came up with this:
function! MyOSCYankAndNormalYank(type, ...) if a:0 " Invoked from Visual mode, use '< and '> marks. silent exe "normal! `<" . a:type . "`>y" elseif a:type == 'line' silent exe "normal! '[V']y" elseif a:type == 'block' silent exe "normal! `[\<C-V>`]y" else silent exe "normal! `[v`]y" endif call OSCYank(getreg("+")) endfunction nmap <silent> y :set opfunc=MyOSCYankAndNormalYank<CR>g@ nmap <silent> yy y_ vmap <silent> y :<C-U>call MyOSCYankAndNormalYank(visualmode(), 1)<CR>
by looking at https://vimdoc.sourceforge.net/htmldoc/map.html#:map-operator and the readme of this plugin and some of its code. But I pretty much started with the thing from map-operator example from vimdoc and fiddled with it and got this.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I wanted
y
and friends to do their regular function but also OSC yank the same text.It seemed to me that I should have been able to do it with the provided operator but I could concoct a solution that way so I came up with this:
by looking at https://vimdoc.sourceforge.net/htmldoc/map.html#:map-operator and the readme of this plugin and some of its code. But I pretty much started with the thing from map-operator example from vimdoc and fiddled with it and got this.
The text was updated successfully, but these errors were encountered: