I am often in a scenario where I want to take all the contents of the current line and paste them into the middle of another line, perhaps into some parentheses or quotation marks.
If I’m in the middle of a line I can type
^y$ which will goto the first
character of the line and then yank to the end without the newline.
This is the rare palindramic vim command. It works the same backwards as it does forwards
There is also a plugin that treats the line as a vim object called vim-textobj-line. Check it out!Tweet