Skip to content

Instantly share code, notes, and snippets.

@hexium310
Created October 3, 2019 16:22
Show Gist options
  • Save hexium310/036ae03e7569886e338c8f3e1a1e3f3d to your computer and use it in GitHub Desktop.
Save hexium310/036ae03e7569886e338c8f3e1a1e3f3d to your computer and use it in GitHub Desktop.
autocmd TermOpen * autocmd TextYankPost <buffer> call <SID>SetLineJoinedLine(v:event)
function! s:SetLineJoinedLine(event) abort
const regcontents = a:event.regcontents
const regname = a:event.regname
const regtype = a:event.regtype
if regtype == 'V'
call setreg(regname, join(regcontents, ''), 'v')
endif
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment