You are not logged in.

#1 2021-01-05 07:59:54

jgun98
Member
Registered: 2021-01-05
Posts: 17

VIM Color [SOLVED]

Hi there,
How can I set my server so can display full 256 color of vim?

I already set
~/.profile
export TERM=xterm-256color

If I use putty and ssh to connect to my server.
Vim already can display great colorscheme but when I use console, It is not.

Regards,
jgun

Last edited by jgun98 (2021-01-10 04:55:38)

Offline

#2 2021-01-05 08:58:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,628

Re: VIM Color [SOLVED]

~/.profile
export TERM=xterm-256color

Don't do that - awesome way to screw yourself.

but when I use console, It is not.

You mean using vim in the linux console (not a VTE in a GUI)?
I don't think the linux console supports > 16 colors, but replacements like kmscon, yaft or fbterm should™
https://wiki.archlinux.org/index.php/KMSCON

Offline

#3 2021-01-05 10:32:53

jgun98
Member
Registered: 2021-01-05
Posts: 17

Re: VIM Color [SOLVED]

Hi seth,
I don't know the terminology.

My arch doesn't have GUI, only command line.
I work on pc that arch installed.
What's call, tty1?

If from other machine remote using SSH, such as use putty to SSH to my arch.
Vim can display 256color full and have a nice appeareance.
I would like to do the same on the computer that I have installed arc.

I am sorry about the terminology mesh up.

Regards,
jgun

Offline

#4 2021-01-05 10:35:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,628

Re: VIM Color [SOLVED]

Yeah, that's the linux console and you'll have to replace it w/ one of the aforementioned terminal emulators to get 256 colors there.
Just exporting TERM to a false value won't help and IS NOT A GOOD IDEA in any event.

Offline

#5 2021-01-05 13:06:49

jgun98
Member
Registered: 2021-01-05
Posts: 17

Re: VIM Color [SOLVED]

Hi,

I don't know what's wrong.
I have install kmscon 8.6 and

systemctl enable kmsconvt@tty1.service
systemctl disable getty@tty1.service

reboot

getty already replace with kmscon on tty1 but still I can not get full color

TERM already back to original value which is linux

Regards,
jgun

Offline

#6 2021-01-05 14:45:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,628

Re: VIM Color [SOLVED]

This neovim patch https://github.com/neovim/neovim/pull/6 … 40af4b41d1 looks like there could be a "bug" in vim.
Try

TERM=linux-256 vim

to fool vim's 256c detection (yes, I'm aware what I said before ;-)

Offline

#7 2021-01-06 04:26:51

jgun98
Member
Registered: 2021-01-05
Posts: 17

Re: VIM Color [SOLVED]

Hi seth,

did you mean

TERM="linux-256 vim"

kmscon bring new console. I can not login with root.

I've tried also using kmscon-patched-git but I'm still can't get 256 color
did I should use neovim?

I'll start to give up

Regards,
jgun

Offline

#8 2021-01-06 07:07:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,628

Re: VIM Color [SOLVED]

No,

TERM=linux-256 vim

will set the TERM to "vim-256" and run vim (assuming you're using bash or zsh or any other shell that allows settin variables this way)

You might try neovim, yes.

I can not login with root.

How exactly can you not login as root? Error messages?

Offline

#9 2021-01-06 09:59:34

jgun98
Member
Registered: 2021-01-05
Posts: 17

Re: VIM Color [SOLVED]

Hi Seth,

How exactly can you not login as root? Error messages? No error messages, just Login incorrect

$ export TERM=linux-256 vim
$ echo $TERM
linux-256
$ clear
'linux-256': unknown terminal type
$ vim
E558: Terminal entry not found in terminfo

Regards,
jgun

Offline

#10 2021-01-06 10:13:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,628

Re: VIM Color [SOLVED]

Wrong password? Did you try to enter it in the user line (so you can see what you effectively type)?
Certainly try https://archlinux.org/packages/community/x86_64/neovim/ to get around potential the colortheme limitation.

Offline

#11 2021-01-06 10:38:09

jgun98
Member
Registered: 2021-01-05
Posts: 17

Re: VIM Color [SOLVED]

Hi Seth,
Did you try to enter it in the user line (so you can see what you effectively type)? I have logon on tty2 as root and no problem
I have tried neovim also and result same with vim.

Regards,
jgun

Offline

#12 2021-01-06 15:21:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,628

Re: VIM Color [SOLVED]

Please use bbgo to quote instead of weird formatting, https://bbs.archlinux.org/help.php#bbcode
The ability to login on tty2 doesn't say anything about the input handling on tty1 - I'm not suggesting that you forgot the password, but that the keys you press might not lead to the expected input.

Offline

#13 2021-01-07 03:21:36

jgun98
Member
Registered: 2021-01-05
Posts: 17

Re: VIM Color [SOLVED]

Hi Seth,

I'm not suggesting that you forgot the password
Actually, user that I use and root using same password


Regards
jgun

Offline

#14 2021-01-07 07:56:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,628

Re: VIM Color [SOLVED]

Check the journal on why it's rejected for the root.

Offline

#15 2021-01-07 09:06:41

jgun98
Member
Registered: 2021-01-05
Posts: 17

Re: VIM Color [SOLVED]

Hi Seth,

Check the journal on why it's rejected for the root.
Until now, I don't know how to check the journal. Will you guide me?

Regards,
jgun

Offline

#16 2021-01-07 09:18:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,628

Re: VIM Color [SOLVED]

Please strip the header (hi, seth) and footer (regards) and only quote if necessary and certainly not yoru own post.

As for the journal, https://wiki.archlinux.org/index.php/Systemd/Journal - it'll be some pam error in the system journal.

Offline

Board footer

Powered by FluxBB