0

I am looking for a $TERM which displays bold text in vim and display airline statusline too. To know what I mean,I have screenshot of two identical files opened by vim but using different terms by sourcing .bashrc file. XTERM VS XTERM-256 color

The left picture is using $TERM=xterm while right picture is using $TERM=xterm-256color. When using xterm, the statusline isn't visible no matter what airline theme I choose. When using xterm-256color, the statusline is visible but text isn't bold.

However, even when the terms are different, the color produced looks same. Here, the left is using xterm while right is using xterm-256color. python term

So, it seems changing term is triggering something in vim that causes unbold color when using xterm-256color and disappeared statusline when using xterm. I want to display both bold color as well as statusline. Is there a fix which would help me get both? I have mistakely asked this question in unix&linux rather than vi stackexchange so I fear my question will get closed. Also, give me names of other $TERMS so that I can try and tell if it fixed the problem.

8
  • Maybe you'll find help in this? xterm is a terminal emulator (just one of many), by default 16-color, xterm-256 instructs the same emulator to use 256 color scheme. vim's settings are in .vimrc if created, if not I think it uses /etc/default/vimrc or /usr/share/vimrc. Statusbar and other colorizations are just settings among others. If the link above doesn't get you started, there's a lot of web resources that advice how to adjust or create a .vimrc that makes it look and behave just the way you want. Sep 13, 2021 at 17:36
  • 2
    vim kind of ignores the terminal description (it has a lot of exceptions). There's no status-line feature in xterm-256color because tsl needs a parameter (not implemented by any terminal you're likely to use). Sep 13, 2021 at 19:04
  • So I should implement my own tsl @ThomasDickey?
    – Machinexa
    Sep 13, 2021 at 19:33
  • @Peregrino69 the question is specifically about changing some settings of vim or xterm or something else like term to get statusline present and bold text present. however thanks for the link, so maybe if i'll not get an answer I will have to implement my own statusline
    – Machinexa
    Sep 13, 2021 at 19:35
  • Well you did ask specifically for a terminal recommendation... :-) I'd implement my own statusline, if for no other reason but it forces me to figure out what's going on in the preferences, which is never a bad idea. The question's still open here, but if StackExchange actually hosts a vi/vim -specific site, I'd definitely drop the question there. Sep 13, 2021 at 20:08

1 Answer 1

0

So, after random trial and error using different $TERMs, $TERMSs with bce, $TERMs with -s, nothing was being changed. I encountered upon this question which let me to variable t_Ut which didn't fix it. However, on further reading questions I read this answer and discovered t_Co variable. I set t_Co=0 which got no color and t_Co=256 got no bold. Setting bad numbers like 1 and 2 didn't give me color but at 8 it was perfect. So my current settings is $TERM=xterm-256color and t_Co=8 in vimrc. vim

This settings gives both awesome color as well as awesome statusline without implementation of custom statusline.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .