From ArchWiki
Latest comment: 19 December 2020 by Kmk3 in topic X clipboard feature

256 Colorschemes

There should be a comment somewhere in the vimrc example pointing out that 256 colors load properlly if the colorscheme sentence on the vimrc is at the bottom of the file

set mouse=a and root terminals

vimrc_example.vim enables mouse support (enter visual mode on selection) via set mouse=a. If you installed gvim, then this also copies text to PRIMARY, as any other selection in Xorg.

This only works if the DISPLAY variable is available, which it usually isn't with sudo. e.g. try with:


I believe the article should point this out: while obvious in hindsight, at first it looks like clipboard support is haphazardly failing. It may be out of scope for Vim#Installation, but we could create a Troubleshooting section. -- Alad (talk) 14:28, 15 January 2016 (UTC)Reply[reply]

On my system DISPLAY is propagated into sudo's session. It is not specified in the sudoers file and man sudoers says "The DISPLAY, PATH and TERM variables remain unchanged;" so I believe this is the default behaviour... -- Lahwaacz (talk) 15:47, 15 January 2016 (UTC)Reply[reply]
You're right, I was using su - and confused things. Well, I assume most users go with sudo and don't face the issue - maybe just link to [1] ? -- Alad (talk) 18:05, 15 January 2016 (UTC)Reply[reply]
Somehow I'm losing the connection between :h mouse and :h clipboard...? Anyway, if you find it appropriate to describe the X11 features more thoroughly, just start a new section. Lahwaacz (talk) 21:06, 15 January 2016 (UTC)Reply[reply]


Some of the links to example configurations are dead and I have replaced them with links to Would these be better replaced by other well documented examples? -- ToxygeneB (talk) 18:25, 29 May 2016 (UTC)Reply[reply]

Nice you looked them up for a start. Generally you are right, particularly since it is likely that vim configuration changes, so the files outdate for sure which can lead to avoidable troubleshooting. If you think from your experience, that it is likely they outdated already, better remove them or replace them. Up to you to decide, if someone disagrees they will likely be re-added with an edit comment on why they are still useful.
In general I think it would be nicer, if the links in the Vim#Configuration_2 had a little comment next to them about special points they might cover. I'm not expert enough to add such though.
--Indigo (talk) 13:11, 30 May 2016 (UTC)Reply[reply]

Maybe adding a link to a Vimrc review on reddit could help. There are more configs than can link here. D4rkshad02 (talk) 19:51, 13 March 2018 (UTC)Reply[reply]

Expansion: vim-bracketed-paste

Bracketed paste helps with pasting multi-line content when autoindent is enabled (no "shifted" text), and may be an alternative to using the X registers. There's an AUR package: vim-bracketed-pasteAUR too. Not sure where to mention it, I guess somewhere in vim#Tips and tricks. -- Alad (talk) 14:44, 7 October 2016 (UTC)Reply[reply]

Plugin managers

In most cases it suffices to add vimscripts to ~/.vim/plugin or /usr/share/vim/vimfiles/plugin/. Rather than make this clear, Vim#Plugins immediately starts by linking several third-party projects but little reason what benefit they offer over the manual approach (apart from a vague reference to other operating systems). As an alternative, it describes the Arch group vim-plugins, again without describing the actual mechanism.

As such, I'd rewrite Vim#Installation_2 to reflect this, and perhaps use Template:App in the process. -- Alad (talk) 14:50, 7 October 2016 (UTC)Reply[reply]

X clipboard feature

So installing an entire dedicated package is better than installing one plugin than could be truncated to literally two lines in vimrc? I think this tip is brilliant in a way that it shows just how hackable vim is. Gvim lacks proper terminal support and rebuilding vim just for a couple features is a burden in my opinion.

—This unsigned comment is by Dyshimte (talk) 23:02, 21 May 2020‎. Please sign your posts with ~~~~!

Would you mind sharing those two lines? I don't know much Vimscript, but looking at the source of vim-system-copy it doesn't seem to be that simple. Kmk3 (talk) 04:42, 19 December 2020 (UTC)Reply[reply]