Arcymag
Arcymag

Reputation: 1037

Why does vim connect to X by default?

The man page says vim -X disables clipboard and window title operation. Is that all we get for vim connecting to X?

I find it a bit surprising, since the default settings slow down vim's startup significantly for me, and I've never needed the clipboard/window title behavior.

This is not gvim, by the way.

Upvotes: 3

Views: 2499

Answers (1)

Piotr Kalinowski
Piotr Kalinowski

Reputation: 2282

My educated guess would be, that it's because most people nowadays use terminal emulators in graphical environments, so it would be useful to behave like nice citizen of such an environment, providing more of a consistency in how various applications look or work.

As a bonus it's more vim-like to use * register for interrogating clipboard.

And more foolproof. I remember graphical terminal emulators where the only way to select text was the old fashioned mouse selection. Given that vim buffer in terminal would not scroll when you selected part of the terminal (as technically selection occurred outside vim in the realm of terminal emulator, and vim was not even aware it's currently taking place) it would not be possible to copy to clipboard anything spanning more than screen could currently hold. And even then it might not work the way you'd want depending on line wrapping settings.

But that is not the problem if editor has connection to system clipboard. Just copy any text you like to * register in the vim-way, and then you have it in system clipboard.

It's still just my speculation.

Upvotes: 2

Related Questions