You can also yank from Vim to the system clipboard with "+y Took me a year or so to learn that one
Pasting Text Into Vim
11–20 of 38 posts
Re: Pasting Text Into Vim
#12You can also yank from Vim to the system clipboard with "+y Took me a year or so to learn that one
Of course it only works for non-terminal vim. Someone may make it work on Mac though by leveraging pb{copy,paste} in some clever way (can't remember the X11 equivalent ATM)
I believe the special + register for the system clipboard is enabled by a compile option, but that may not be entirely accurate. I have Vim 7.3 installed via Macports and it works for me.
Re: Pasting Text Into Vim
#13tmux buffers Will solve your copy and paste problems across all UNIX applications. Thank you Mr. Marriott. Great software.
doesn't really help with content in vim's registers... (but you are right, tmux is great)
1. Ctrl-B [ 2. Ctrl-Space 3. copy desired text 4. Ctrl-w 5. ESC+Shift-: 6. Ctrl-B ] to paste on the vim command line
Re: Pasting Text Into Vim
#14The title "pasting text into vim" is kind of wrong. This isn't really about pasting text into vim, that is a very easy thing you learn in your first hour of vim (press p or at worst "+p). It is about the more meta activity of pasting text (e.g. representing a vim command or an argument to a vim command) into the vim command line.
Re: Pasting Text Into Vim
#15"I'd like to paste yanked text into Vim command line." While the top voted answer is very complete, I prefer editing the command history. In normal mode, type: q: This will give you a list of recent commands, editable and searchable with normal vim commands. You'll start on a blank command line at the bottom. For the exact thing that the article asks, pasting a yanked line (or yanked anything) into a command line, ya…
You can leave command history just by typing , not :q.
Re: Pasting Text Into Vim
#16Re: Pasting Text Into Vim
#17Not to start an editor war or anything. But a comparable feature set can be found in Emacs[1]. [1]: http://www.gnu.org/software/emacs/manual/html_node/emacs/Reg...
I personally find this extremely useful--I use it far more than any other register-based feature. Of course I effectively use Emacs as my window manager for everything except web browsing, ergo I am certifiably insane.
And if ezbl or a similar project ever matures, I might start browsing from Emacs too :P.
Re: Pasting Text Into Vim
#18Re: Pasting Text Into Vim
#19The title "pasting text into vim" is kind of wrong. This isn't really about pasting text into vim, that is a very easy thing you learn in your first hour of vim (press p or at worst "+p). It is about the more meta activity of pasting text (e.g. representing a vim command or an argument to a vim command) into the vim command line.
When I read "pasting text into vim", I thought of still another thing: ":set paste".
Re: Pasting Text Into Vim
#20Earlier quoted context omitted.
Of course it only works for non-terminal vim. Someone may make it work on Mac though by leveraging pb{copy,paste} in some clever way (can't remember the X11 equivalent ATM)
It can work in terminal vim, too. I believe the special + register for the system clipboard is enabled by a compile option, but that may not be entirely accurate. I have Vim 7.3 installed via Macports and it works for me.
brew install macvim --override-system-vim
to see if things improve.EDIT: it works.