LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 14.1: copy/paste with Vim in Xfce Terminal (https://www.linuxquestions.org/questions/slackware-14/slackware-14-1-copy-paste-with-vim-in-xfce-terminal-4175489982/)

kikinovak 01-03-2014 04:26 AM

Slackware 14.1: copy/paste with Vim in Xfce Terminal
 
Hi,

I'm running Slackware64 14.1 + Xfce on my main workhorse PC. I've noticed an annoying change in Vim's behaviour, or maybe it's Xfce's terminal. I can't seem to copy/paste text from another application into Vim. Right now I have Firefox open, and I want to copy/paste text from a webpage into Vim. There's no way to do this.

Anyone knows what's wrong?

tronayne 01-03-2014 06:09 AM

It works for me (64-bit, 14.1, Xfce). I just highlight a bunch of text in some other window, do insert in vim, center click and there it is (sometimes I do have to right click in the source and copy then right click and paste in vim, though, don't know why that is).

I do that sort of thing all the time between Google search and Google Translate then copy-paste into the editor without any problem. The only thing that's goofy now an again is that because I always have autoindent set in ~/.exrc and that can get messy but otherwise no problems.

arsivci0 01-03-2014 07:20 AM

No problems, here. Vim ver: 7.4.50, 14-1 64bit.

enorbet 01-03-2014 08:25 AM

This is slightly Off Topic but should be of considerable interest to those who love VIM.

http://www.youtube.com/watch?feature...&v=aHm36-na4-4

I had read that Stallman surfs the web with Emacs but I still had no idea just how powerful and varied vim can be even after more than 10 years experience. Enjoy!

bosth 01-03-2014 09:31 AM

If you are using gvim/qvim, you can use 'p' to paste when you have:
Code:

set clipboard=unnamed

xflow7 01-03-2014 10:12 AM

If you're trying to use 'p' or 'P' to paste from the clipboard ("+) into Vim running in the terminal window, you'll need to rebuild Vim to be X-aware by removing the --without-x option in vim.SlackBuild. That is, replace

Code:

config_vim --without-x --disable-gui
with

Code:

config_vim --disable_gui
This isn't new with 14.1, though.

Dave

TracyTiger 01-03-2014 10:57 AM

Use Window Edit Functions
 
This doesn't answer your question, but just some information on how I handle it....

I find that keyboard commands sometimes don't work when copying from a graphics application and pasting into VIM. If I use COPY from the EDIT menu found in most graphic applications, then use the PASTE selection of the EDIT menu in the Xfce Terminal Emulator it works 99%-100% of the time.

Before I paste into VIM I open a new line for input ('o' command) then do the paste.

I don't copy/paste very many times a week so this process works for me. Because I'm using this "window menu based solution" I haven't noticed any changes that may have occurred in the last couple of years. I'm currently using Slack64-14.0.

EDIT: You may want to try the copy/paste on different web pages in case the problem is just with one site. I believe a web page can be constructed to make text unselectable. For example, the old trick of placing a single transparent pixel on top of an item on the page.

Bertman123 01-03-2014 04:16 PM

in XFCE terminal you'll need to press shift+ctrl+v in order to paste. Or right click and select paste.

dugan 01-03-2014 07:06 PM

The first thing I do in a new Slackware installation is rebuild vim with the "--with-x" flag. And with Ruby support.

kikinovak 01-04-2014 02:44 AM

Quote:

Originally Posted by Bertman123 (Post 5091422)
in XFCE terminal you'll need to press shift+ctrl+v in order to paste. Or right click and select paste.

Right click context menu seems to be deactivated in Vim. But the keyboard shortcut worked!

Thanks very much everybody. Problem solved.


All times are GMT -5. The time now is 10:48 PM.