Results 1 to 4 of 4
I am using vim as a text editor. I have problems when I trying to copy something from another source (i.e. a web page), and then paste it in the ...
- 04-11-2009 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 32
Problems with copying and pasting with vim
I am using vim as a text editor. I have problems when I trying to copy something from another source (i.e. a web page), and then paste it in the document, which I have opened with vim. It doesn't work.
I also cannot copy copy something from the document opened with vim, and then paste it somewhere else, i.e. in my email. I am doing this with the vim commands yy and p. "Copy" and "paste" with the right-mouse-click doesn't work.
Could give me a clue how I can copy and paste in/from vim as with other editors such as Word (Microsoft) or Emacs.
Thanks a lot!
- 04-11-2009 #2
It may or may not be possible depending on your version of vim and how it was compiled.
First of all run "vim --version" (no quotes)
Look in the text produced, if you see +xterm_clipboard then the following should work, if you see -xterm_clipboard, it won't and you will need to find a version compiled with clipboard support or recompile your own!
Assuming you have support
"+yy or "*yy to copy to clipboard
"+p or "*p to paste from clipboard
in the above vim commands the " is neededIf we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 04-11-2009 #3Just Joined!
- Join Date
- Sep 2008
- Posts
- 32
Thanks a lot for the reply!
Yes, when I typed "vim --version", I have seen that I have -xterm_clipboard.
However, I cannot understand your second lines about yy and p: do I have to see these "+yy, "*yy, "+p or "*p somewhere, i.e. in the output of "vim --version" ? I don't see them.
I can use the commands yy, nyy (n for the number of lines), and p without problems when I am using them only in the current open file with vim.
I have also two questions about -xterm_clipboard:
1. How do I know whether the version has +xterm_clipboard before I install it and be able to check that with "vim --version" ?
2. How can I compile/recompile a version on my own ? (I would like to know that. If it is too long to explain this, do you know some tutorial for that ?)
Thank you.
- 04-11-2009 #4
-xterm_clipboard means that you wont be able to copy and paste from the clipboard without having a version of vim specifically compiled for it.
The commands I gave are vim commands, you type them in the editor itself, however you don't have clipboard support so they wont work anyway.
Have a look at welcome home : vim online to get the latest version, sources and specific helpIf we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.


Reply With Quote