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?
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?
~/.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'
" 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
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:
urxvt doesn’t support that option, can find/remove it in your vimrc like:
Could also wrap it in an if block to keep true colour support for other terminals.
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.
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