Vim move / copy line to end of file without moving cursor? -


i use :.m$ move or :.t$ copy current line end of file. easier if cursor won't jump end of file or target location of move / copy command. there option it?

give these 2 mappings try:

"move current line end of buffer without moving cursor nnoremap <leader>mv ddgp``  "copy current line end of buffer without moving cursor nnoremap <leader>cp ygp`` 

note move case, cursor position changed text of next line, since original line of text has gone. sits on same line (number).

if required anonymous register (") untouched, think need write function it.


Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -

Save and close a word document by giving a name in R -