RXVT problems

Hello guys, new to ArchLabs and I gotta say, I love it, but I have this weird issue with VIM and RXVT
when i run VIM in RXVT it looks like this

while in termite the colors run fine

how can i solve this? i tried googling, but when i checked the solutions that i found on the net, everything seems to be in order and fine …

another thing I’m really annoyed about RXVT is that CTRL+C CTRL+V or CTRL+SHIFT+C and CTRL+SHIFT+V is not working, I dislike the SELECT TO COPY and MIDDLE MOUSE TO PASTE solution, when I used ArcoLinux, CTRL+C and CTRL+V work fine, also the VIM colors work fine there … So I’m really lost about this, can anyone help me resolve this?

1 Like

Welcome to the forums @kronikpillow!

I get the same thing on it. It may be something to do with where it’s looking for it’s config? Looks like it uses ~/.Xresources for this. You may have to play with the colors there.

Hello @kronikpillow and welcome to the forum

You try loading without a vimrc?

vim -u NONE

Could also be the shell configuration messing with it.

bash --noprofile --norc

For the copy paste, ^c/^v aren’t going to be used, but you can install this package

pacman -S urxvt-perls

Then alt-c/v will copy paste.

1 Like

Welcome to the forum @kronikpillow. Have you tried @natemaia idea, he’s pretty much the archlab’s resident wizard…

Ok, so here’s the thing, when i run sudo vim it loads the colors properly in 256 colors mode, but when i run vim its like in the above screenshot, i find this very strange…

@natemania strange, never tried ctrl+alt+c and ctrl+alt+v with urxvt-perls, but it works, I came from ArcoLinux to ArchLabs, and there, urxvt-perls runs with ctrl+shift+c and ctrl+shift+v, so I’m guessing i can rebind those keys

what shell configuration? i’m using bash with the default setup, but i tried zsh as well, same problem …

I have found a “solution” to this on my own by installing the rxvt-unicode-truecolor package from the AUR and now it’s representing everything in true color with both sudo vim and vim …

but al-info still displays the terminal as rxvt-256color and even the window manager displays it as rxvt-256color …
on the other hand neofetch displays it as urxvt …

do you know maybe where i can change the terminal name from rxvt-256 color to lets say rxvt-truecolor or urxvt?

Does syntax highlighting enabled in .vimrc ?

~/.bash/* and ~/.bashrc, for zsh they’ll be the zsh counterparts

Set the terminal name in your shell rc file


If you’re using the vimrc included then you’ll likely have this in there somewhere

if $TERM !=? 'linux'
	set termguicolors

	" true colors in terminals (neovim doesn't need this)
	if !has('nvim') && !($TERM =~? 'xterm' || &term =~? 'xterm')
		let $TERM = 'xterm-256color'
		let &term = 'xterm-256color'

	if has('multi_byte') && $TERM !=? 'linux'
		" ▏│ ┆ ┃ › »»
		set list listchars=tab:▏\ ,extends:❯,precedes:❮
		set fillchars=vert:┃ showbreak=↪

Remove the middle bit regarding xterm and colours or change it to be whatever terminal name you need, but it’s a workaround hack for vim with terminals that support true colour but vim doesn’t know about it (st), just use neovim and be done with it honestly, it has better terminal support ootb.

@natemaia mate i tried neovim as well, it has the same problem, if i run sudo nvim filename color scheme displays properly, if i run nvim filename both color scheme and syntax highlighting are messed up

This post : https://vi.stackexchange.com/questions/4232/why-does-my-colorscheme-look-different-when-i-run-vim-with-sudo suggests its a read permissions problem with the color and syntax files in the vim folder, i tried the above mentioned fix, but it didnt work for me as obviously the color scheme it’s using is actually in the home folder :-/

You would think ArchLabs would have this kink solved by default since its defaulting to w
256 color terminals and vim as a text editor

You never answered my original question… Does the problem persist when loading your shell and vim without configs?

yes mate it does, don’t you have the same problem? Can you replicate it so that we can solve it? I’m fresh out of ideas, tried every possible solution out there on the net, and the problem keeps persisting
I am using a clean default install, tried I3, BSPWM, and Openbox, it persists in every reinstall …

I think you may missed the fact that when i sudo vim or sudo neovim all colors load properly, the user group doesn’t have proper permissions setup to load the colors … running bash without a .bashrc profile and aliases is kinda dull and pointless as aliases save time

This makes no sense, vim has nothing to do with user groups and the like, 90% of the runtimepath is outside of user write permission on most systems regardless. sudo vim is not equivalent to vim -u NONE and only tells me that root’s configs differ from your users, I just wanted to know if it was something with the vimrc or not.

As shown above, it’s to do with the block where some colour hacks are in the vimrc, disabling termguicolors fixes it:

:set notermguicolors<CR>

urxvt doesn’t support that option, can find/remove it in your vimrc like:

:%s/set termguicolors//<CR>

Could also wrap it in an if block to keep true colour support for other terminals.

left is sudo vim, right is vim … which suggests that the user group has some permission problems with vim …

here is the result of :scriptnames in both

as we can see, the user uses ~/.vim/colors/jinx.vim and root does not, when i use xterm it displays colors properly, shown bellow

here is the result of ls-l for /.vim/colours
ls -l 12:01:02 total 24 -rw-r--r-- 1 kronikpillow users 20809 Mar 3 09:54 jinx.vim

and here is the result of ls-l for /.vim/after/syntax
total 12 -rw-r--r-- 1 kronikpillow users 12005 Mar 3 09:54 c.vim

yes it can be solved by using notermguicolors but i want to keep the colors :-/

urxvt does not have true colour support, use a different terminal if you want to use termguicolors see here for some good examples

No, termguicolors is just not enabled by default in vim, and since your root doesn’t have a vimrc it’s just using the default colorscheme.

If you copy you’re configs to /root you’d see it’s exactly the same, the reason xterm works is because it is the standard terminal emulator and urxvt is just different, many of the escapes sequences it uses are non-standard due to being written before xterm compliance was a thing.

Ok, so i’ll just stick to my own selfmade solution

baph -i rxvt-unicode-truecolor :slight_smile:

That uses up more memory than the stock rxvt-unicode and is significantly slower if more than 6 (fallback) fonts are loaded.

Why not try xterm instead? That has true colour support for the stock configuration.

well @Head_on_a_Stick i tried every solution i can find, nothing works … I have even went so far to install a different Arch based distro (one which’s name is censured here) and tried running vim in it, and the coloring in urxvt works just fine … and no one here, seems to know the real solution, so i don’t know what else to do :-/

They include no vimrc so I can’t say I’m suprised, you want it to work like the belgian’s distro then the solution is very simple

rm -rf ~/.vim*

I’m getting sick of being told “I don’t know the solution” when I’ve told you now 3 times that the solution is to remove the line from your vimrc that is enabling termguicolors, you’re using parts of my vimrc and colourscheme. I like termguicolours and terminal emulators that aren’t shitty, so it’s enabled by default in that vimrc.


wooow there mate, you need to relax, your assuming that people actually know everything in Linux, I have no clue what “remove the line from my vimrc that is enabling termguicolors” means … I’m not a linux expert, on the contrary, newbie, going trough learning phases