Review your favorite Linux distribution.
Go Back > Blogs > Lumak's Guide to Random Things
User Name


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-21-2009 at 12:41 AM by lumak
Updated 05-31-2009 at 03: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 2936 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 09:53 PM.

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