Mike’s Linux Desktop Experiences

February 23, 2008

Wresting with gvim to post Old Experiences

Filed under: Uncategorized — Mr. Mike @ 11:41 am

Today I’m going back and adding a lot of what I experienced back in late January while working with this machine. To do this, I threw gvim on to my machine.

Now in Windows, I could just go into something like WordPress, do ctrl-a, ctrl-c, alt-tab, esc, i, shift-ins and I would have the full text of whatever I was doing in WordPress in gvim.

It seems that this version of gvim doesn’t like the Windows editing keys. Grr. That’s the first I’ve seen of that. Ctrl-x, Ctrl-v and Ctrl-c I can understand, but Ctrl-Insert and Shift-Insert?
Consistency in a UI is a key part of user friendly interfaces. It’s okay to break it to enhance speed, but is [quote], +, g, Shift-P faster or more intuitive than Shift-Insert?


I guess it’s all a pointless gripe. I don’t have the time or energy to try to figure out how to reconfigure/recompile/repackage or whatever to get my editing keys to have some semblence of normalcy.

Time for a different tactic…

It looks like installing gvim through Add/Remove… has set my systemwide vi to vim, and gnome-terminal seems to not have a problem with Ctrl-Insert/Shift-Insert. Although I can’t do a Ctrl-a to select all, which makes gathering the edited text to paste back into a browser text editor kind of absurd.

So I ask Google… “read a file into the clipboard command line linux”


I’m impressed. Another WordPress blogger.

    mike@whitetower:~$ sudo apt-get install xclip
    [sudo] password for mike:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
    0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
    Need to get 17.2kB of archives.
    After unpacking, 77.8kB of additional disk space will be used.
    Get:1 http://ca.archive.ubuntu.com gutsy/universe xclip 0.08-7 [17.2kB]
    Fetched 17.2kB in 0s (47.1kB/s)
    Selecting previously deselected package xclip.
    (Reading database ... 98177 files and directories currently installed.)
    Unpacking xclip (from .../xclip_0.08-7_amd64.deb) ...
    Setting up xclip (0.08-7) ...

Let’s see if this works…


And we paste…. nothing.

middle click?


Oh feck. It uses the X buffer not the clipboard. I am NOT going ot reach my hand over to the mouse to do a delicate middle-click every time I want to move text from vim back to my browser!

grr… more reading.

Found something in that guy’s blog.

Of course…

    :%!xclip -o -selection c

vim remembers these commands so I can type :, up-arrow multiple times. It’s a beginning. I might have to toss it in a script.

All that said, anyone know how to fix this dumb gvim default?



  1. I should apologize somewhat for my xclip post. I need to clean it up a bit and I wrote it before testing the alias I mentioned…which didn’t work. “xclip -o -selection c” does work as I mentioned it, at least for me.

    I will endeavor not to write about command line apps when very tired in the very early morning. πŸ˜›

    Comment by elcasey — February 23, 2008 @ 4:05 pm | Reply

  2. elcassey, your xclip post was excellent, it pointed me to exactly what I needed. Thank you πŸ™‚

    Comment by Mr. Mike — February 23, 2008 @ 10:00 pm | Reply

  3. *g*vim ? HERETIC ! *points finger*

    Comment by vegiVamp — February 25, 2008 @ 3:16 am | Reply

  4. You must respect my diversity. I use gvim and I’m proud of it.

    It’s particularly handy…. on….


    Comment by Mr. Mike — February 25, 2008 @ 9:34 am | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: