Score:0

How to fix vim color scheme in other terminals?

ua flag

I'm not using Ubuntu, but I feel like this question will be relevant in any other distribution. So the problem I'm dealing with right now is I don't like gnome-terminal. I've tried alacritty, konsole, st (currently in use), and they're all having the same issue – they break my vim color scheme. Here's what I mean by that: example. In this screenshot, gnome-terminal is on the left, and st is on the right.

I'm using the same color profile in both terminal emulators, and I don't have .vimrc since I rarely use vim locally. Somehow gnome-terminal manages to maintain the right colors, although in both terminals vim color scheme in use is the default one.

I've tried searching for ways to solve this, the only thing that I found is to specify the $TERM variable to be xterm-256color, but it didn't help. Another thing that I've noticed is when I force gnome-terminal's vim to use the default color scheme, colors are the same as in st's vim.

I'm actually lost and have no idea what to do with this. There's no point in editing .vimrc because I ssh a lot and it won't have any effect. It doesn't sound like a big problem, but these colors are quite distracting. Any help will be appreciated, thanks to everyone who has read this.

p.s. also please forgive my ugly english

TonyB avatar
za flag
So you want to change colors without using a .vimrc. Have you considered entering the ":colorscheme <scheme_name>" (example: :colorscheme desert). Note: the command is given within vim, beginning with a colon . There are a number of colorschemes installed with vim which are located (on Ubuntu) at: /usr/share/vim/vim*/colors/
spdierman101 avatar
ua flag
@TonyB The problem is, `:colorscheme` in both terminals prints out `default`, but `:colorscheme default` in gnome-terminal's vim makes colors the same as in st's vim. I should have written this more explicitly...
spdierman101 avatar
ua flag
Just figured out that gnome-terminal's default color scheme is `ron`. So the question changes to how to specify default vim color scheme in terminal's config without `.vimrc` and `:colorscheme` (I ssh like fifty times a day, each time it's a different machine, that's not an option).
muru avatar
us flag
If you're not using Ubuntu, please ask on [Unix.se] where other Linux distributions are very welcome.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.