LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > Lumak's Guide to Random Things
User Name
Password

Notices


OK I don't really have a good title yet but I figure I can post works in progress and other tips I've come across or other interesting things.
Rate this Entry

Slackware Undocumented 'Well Duh' Quark #2917 - console vim and X11 clipboard

Posted 03-20-2009 at 11:41 PM by lumak
Updated 05-31-2009 at 02:41 PM by lumak

The special registers * and + do not function in console vim in Slackware. Vim has been compiled both with -clipboard and -xterm_clipboard. If you enable GPM, you can shift highlight in console vim to middle click past in any x application. You can also Shift+middle click in console vim to past text from any x application. If you don't want to use the Shift modifier, you can sacrifice mouse functionality and type ":set mouse=r" in normal mode. This issue does not affect gvim.

------------------ Rant ----------------------

This was bugging me for a while because I much prefer the xterm when the gui version has the same functionality. I never took the time to find out why the hell the console version could not paste text from the clipboard. After a short bit of searching I found out the secret and how to find out if I have the support. "vim --version | grep clipboard"
5 seconds after this I realized the importance of a conscious choice by the Slackware maintainers to use -clipboard and -xterm_clipboard. Why the hell should a console program include links to libraries that may not even exist on a bare bones server?! What if you have to fix 3 characters in that HTML file to fix that problem and vim is you favorite/only text editor? I know I wouldn't want to have X11 installed on this server and I sure as hell wouldn't want to move the file some where else just to edit it then move it back. Thank you Slackware for asking "what if there is no X11?" What about copy/paste between two vim instances running in the same xterm? I don't know, the normal registers don't appear to be shared between them. I'm thinking you are better off using the 'tab' or window feature the buffers will work then. But why the hell does ":set mouse=r" work if the clipboard is not compiled in? Because the options +mouse +mouse_gpm and +mouse_xterm are all enabled. I'm guessing these are enabled because one is more than likely to not have X11 but leave smaller minor packages in? OK well I thought I did have a rant as a thank you for providing an x11 free vim but now I'm confused about the mouse_gpm and mouse_xterm options...
Views 3175 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 05:47 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration