In insert mode
<c-y> copy a character at a time from the above line.
I generally use these when working with aligned bits of text inside a program and want to copy to the end of the line more often than anything else.
Is there a way to do this?
So far I've been using:
inoremap <c-e> <esc>lj"py$hk"pp`[ inoremap <c-y> <esc>lk"py$hj"pp`[
and a slightly better version to that doesn’t stop executing at the
h when running at the 0th column.
inoremap <c-e> <c-o>:stopinsert<cr>j"py$kv"pp`[ inoremap <c-y> <c-o>:stopinsert<cr>k"py$jv"pp`[
But I'm not thrilled with either of those bindings since it clobbers a named register, seems dependent on
Is there a simpler/more elegant way to copy the trailing portion of the above line?