10 years ago
Useful when typing something which shares prefix with the line above!
" insert word of the line above inoremap <C-Y> <C-C>:let @z = @"<CR>mz \:exec 'normal!' (col('.')==1 && col('$')==1 ? 'k' : 'kl')<CR> \:exec (col('.')==col('$') - 1 ? 'let @" = @_' : 'normal! yw')<CR> \`zp:let @" = @z<CR>a
mwgkgk 10 years ago
Clever!