Posts: 54
Joined: Sun Feb 22, 2015 6:35 pm

vim is weird on RPi

Mon Apr 08, 2019 10:19 am

This is driving me crazy. OK, I use vim - a lot. I like its features, and it is available on all my Linux systems -also a lot. The version of vim on the RPi systems (or maybe it is a Jessie thing: at this point only my Raspberry Pi hosts are running Jessie) is aggravating , though. Among my top complaints:

1. The cursor moves with the mouse pointer. I don't like this, at all. One of the really great things about vim is its ability to highlight one section of the screen while leaving the cursor elsewhere. This new behavior is like Windows, and it really sucks.

2. Related to #1, after highlighting any text, the app automatically switches to VISUAL mode, wherein one can no longer type in text. Rather than automatically loading the highlighted text into the keyboard, one must hit the (Y)ank key. At this point, the text is loaded into the vim clipboard not the Linux clipboard!), the mode drops back to its previous value (actually, this bit is sort of cool), and removes the highlighting (seriously?).

3. Vim no longer employs, or to some extent it seems even interacts with the OS clipboard. Are you kidding me?
What's more, who ever had an idea it was preferable in any way to the previous behavior. Cut-and-paste between vim and the parent shell, between one instance of vim and another, or between some other application and vim used to be quick, simple, and easy. Now it is terrible. To paste from some other window, instead of simply hitting the middle mouse button, one must hit <Ctrl><Shift>v, or click on [file][paste]. I don't mind having the keyboard and drop-down versions of the Paste function - I think it is a very good idea, but pasting from the mouse should be identical to pasting from the keyboard and the drop-down. More importantly, while pasting is now a pain, I haven't been able to figure out any way to copy text from vim to the system keyboard. That is completely unacceptable. (Can anyone tell me how to accomplish this, by the way?) If I want to copy to the system clipboard, I have to save my changes to the file being edited, hit <Ctrl>z to drop back to the parent shell, type cat, more, or less, and highlight the text with the mouse. There is absolutely no reason why vim should not continue to work in precisely the same way BASH and essentially every other application does under Linux. Trying to make a Linux app more like Windows apps is not a welcome idea. In fact, it is just stupid. I use Linux so I don't have to contend with moronic Windows features.

OK, enough ranting. I realize first of all this may be either a Debian / Raspbian version issue or a vim developer issue, in which case I may need to take my complaints to the vim developers or the distro managers, rather than this forum. I am hoping, however, that someone here may be able to tell me there is a way to get vim 8.0 under Raspbian Jessie to behave like its previous versions in terms of the mouse actions. I didn't spot anything in the man page. If not, can someone at least tell me how to get text out of an instance of vim into an external application?

[moderator removed some swear words]

User avatar
Posts: 37069
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: vim is weird on RPi

Mon Apr 08, 2019 10:32 am

sudo apt install vim-full will get it working normally.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Posts: 2
Joined: Tue Apr 09, 2019 8:17 pm

Re: vim is weird on RPi

Tue Apr 09, 2019 8:19 pm

Or you could compile it from the source which I've found has worked best, lets you specify the pi's specific python configs etc. ... rom-source

Return to “Advanced users”