[SOLVED] Copy from vim and pasting to another application
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I already did my search and found 2 possible solutions that unfortunately didn't work for me.
In this video the guy solves the problem installing gvim, but when I try to do that, my terminal says to me that vim is in conflict with gvim, so I just can have either vim or gvim and I would like to continue using just vim.
This is the output:
Code:
looking for conflicting packages...
:: gvim and vim are in conflict (vim-minimal). Remove vim? [y/N]
I also found another possible solution in this Stack Overflow question, unfortunately the accepted answer doesn't work for me, or maybe I didn't understand well how I should do it.
From what I understood:
1- Enter in visual selection mode and select the text you want.
2- Press "
3- Press either * or +
4- Press y
Vim recognizes the " command but no the + or * command, so as soon as I press * or + vim stops the ... command chain? (sorry I don't know what word I could use here lol).
By "recognizing" I mean that near the bottom right corner vim shows the command that was typed.
PD: I use Manjaro, the vim I installed was from my distro repo.
Last edited by Ghost-Order; 07-22-2020 at 12:20 AM.
Copy...highlight what you want to copy with the mouse
Paste into another application...either click on middle mouse or ctrl+v Either should work, but which depends on the app.
when you install gvim you will have vim too, so you can safely remove that standalone vim (and also you can reinstall it if you really need that).
As it was stated you have vim-minimal installed currently which explains that behavior.
But I prefer using terminal facilities for this, anyway. Depending on the terminal, this may be Ctrl+Shift+C/Ctrl+Shift+V (Alacritty), or Ctrl+Ins/Shift+Ins (URxvt), or both (gnome-terminal, xfce4-terminal). PuTTY/Pterm can be set to either.
Copy...highlight what you want to copy with the mouse
Paste into another application...either click on middle mouse or ctrl+v Either should work, but which depends on the app.
This was my thinking. Well, mine was more "What's wrong with the old 'Highlight, copy, paste'?"
But that is truly a follow-up here. Which is whether or not that option was tried, and whether or not it was evaluated as unacceptable for some reason?
Copy...highlight what you want to copy with the mouse
Paste into another application...either click on middle mouse or ctrl+v Either should work, but which depends on the app.
It doesn't work for me, as soon as I start highlighting vim enters in visual selection mode, so I select the text I want then try to paste it to firefox for instance and it doesn't work.
Quote:
Originally Posted by pan64
when you install gvim you will have vim too, so you can safely remove that standalone vim (and also you can reinstall it if you really need that).
As it was stated you have vim-minimal installed currently which explains that behavior.
I didn't knew about that, thank you. Now I can just remap the "+y or "*y commands to a more friendly and quickly key combination.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.