Vim themes not applying

Hello. I have been using Garuda for about a year now and have loved the distro a lot, so thank you first of all for making such a nice distro that never (almost never) breaks.

I came across an issue I can't seem to fix, I have been using Vim more and tried to theme it, but I cannot seem to do so. Here is my .vimrc

I have tried to use bash, bash as root, alacritty, konsole and I can't get it to be themed differently to konsole. I thought this was a starship issue but as bash doesn't theme vim either I am not sure.

My TERM variable is set to xterm_256color.

set t_Co=256

syntax on

set tabstop=2 softtabstop=2 expandtab shiftwidth=2 smarttab

call plug#begin('~/.vim/plugged')

Plug 'vim-airline/vim-airline'

Plug 'vim-airline/vim-airline-themes'

Plug 'arcticicestudio/nord-vim'

Plug 'preservim/nerdtree'

call plug#end()

let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='atomic'
nmap <F6> :NERDTreeToggle<CR>

colorscheme nord

inxi -Faz

System:    Kernel: 5.15.4-arch1-1 x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux root=UUID=dfcb3661-1f27-4121-913e-0307fb481485 rw rootflags=subvol=@
quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1 loglevel=3
Desktop: KDE Plasma 5.23.3 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux
base: Arch Linux
Machine:   Type: Desktop System: PC Specialist product: Intel Z370 v: N/A serial: <filter>
Mobo: Gigabyte model: Z370 AORUS ULTRA GAMING 2.0-CF v: x.x serial: <filter> UEFI: American Megatrends v: F4 PI
date: 08/14/2018
CPU:       Info: 6-Core model: Intel Core i7-8700K bits: 64 type: MT MCP arch: Kaby Lake note: check family: 6
model-id: 9E (158) stepping: A (10) microcode: EA cache: L2: 12 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 88824
Speed: 4109 MHz min/max: 800/4700 MHz Core speeds (MHz): 1: 4109 2: 4397 3: 4398 4: 4334 5: 4364 6: 4325 7: 4157
8: 4384 9: 4398 10: 3646 11: 4397 12: 4111
Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling
Type: srbds mitigation: Microcode
Type: tsx_async_abort mitigation: TSX disabled
Graphics:  Device-1: Intel CometLake-S GT2 [UHD Graphics 630] vendor: Gigabyte driver: i915 v: kernel bus-ID: 00:02.0
chip-ID: 8086:3e92 class-ID: 0380
Device-2: NVIDIA GP106 [GeForce GTX 1060 6GB] vendor: ZOTAC driver: nvidia v: 495.44 alternate: nouveau,nvidia_drm
bus-ID: 01:00.0 chip-ID: 10de:1c03 class-ID: 0300
Device-3: Generalplus GENERAL WEBCAM type: USB driver: snd-usb-audio,uvcvideo bus-ID: 3-1:2 chip-ID: 1b3f:2247
class-ID: 0102 serial: <filter>
Display: x11 server: X.Org 1.21.1.1 compositor: kwin_x11 driver: loaded: nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 2560x1440 s-dpi: 92 s-size: 707x393mm (27.8x15.5") s-diag: 809mm (31.8")
Monitor-1: HDMI-0 res: 2560x1440 dpi: 93 size: 697x393mm (27.4x15.5") diag: 800mm (31.5")
OpenGL: renderer: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 v: 4.6.0 NVIDIA 495.44 direct render: Yes
Audio:     Device-1: Intel 200 Series PCH HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel bus-ID: 00:1f.3
chip-ID: 8086:a2f0 class-ID: 0403
Device-2: NVIDIA GP106 High Definition Audio vendor: ZOTAC driver: snd_hda_intel v: kernel bus-ID: 01:00.1
chip-ID: 10de:10f1 class-ID: 0403
Device-3: Razer USA Kraken Kitty Edition type: USB driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-5.3:7
chip-ID: 1532:0521 class-ID: 0300 serial: <filter>
Device-4: Generalplus GENERAL WEBCAM type: USB driver: snd-usb-audio,uvcvideo bus-ID: 3-1:2 chip-ID: 1b3f:2247
class-ID: 0102 serial: <filter>
Sound Server-1: ALSA v: k5.15.4-arch1-1 running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: yes
Sound Server-4: PipeWire v: 0.3.40 running: yes
Network:   Device-1: Intel Ethernet I219-V vendor: Gigabyte driver: e1000e v: kernel port: N/A bus-ID: 00:1f.6
chip-ID: 8086:15b8 class-ID: 0200
IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: docker0 state: down mac: <filter>
RAID:      Hardware-1: Intel SATA Controller [RAID mode] driver: ahci v: 3.0 port: f060 bus-ID: 00:17.0 chip-ID: 8086:2822
rev: class-ID: 0104
Drives:    Local Storage: total: 1.6 TiB used: 252.35 GiB (15.4%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: WDS500G2B0C-00PXH0 size: 465.76 GiB block-size:
physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 211210WD temp: 32.9 C
scheme: GPT
ID-2: /dev/sda maj-min: 8:0 vendor: A-Data model: SU800NS38 size: 238.47 GiB block-size: physical: 512 B
logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 4A scheme: GPT
ID-3: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST1000DM010-2EP102 size: 931.51 GiB block-size:
physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter> rev: CC43 scheme: GPT
Partition: ID-1: / raw-size: 465.51 GiB size: 465.51 GiB (100.00%) used: 252.35 GiB (54.2%) fs: btrfs dev: /dev/nvme0n1p2
maj-min: 259:2
ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 547 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1
maj-min: 259:1
ID-3: /home raw-size: 465.51 GiB size: 465.51 GiB (100.00%) used: 252.35 GiB (54.2%) fs: btrfs dev: /dev/nvme0n1p2
maj-min: 259:2
ID-4: /var/log raw-size: 465.51 GiB size: 465.51 GiB (100.00%) used: 252.35 GiB (54.2%) fs: btrfs
dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 465.51 GiB size: 465.51 GiB (100.00%) used: 252.35 GiB (54.2%) fs: btrfs
dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 31.22 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0
Sensors:   System Temperatures: cpu: 27.8 C mobo: 16.8 C gpu: nvidia temp: 48 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 41%
Info:      Processes: 391 Uptime: 1h 40m wakeups: 2 Memory: 31.22 GiB used: 7.27 GiB (23.3%) Init: systemd v: 249
tool: systemctl Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: 1736 pacman: 1730 lib: 394 flatpak: 6 Shell: fish
v: 3.3.1 running-in: konsole inxi: 3.3.08

Try running this: dotfiles/truecolor.sh at master · sonph/dotfiles · GitHub
If it shows colors, it could be that the problem is not with konsole, but with vim.
I suppose neovim (nvim) might work?

2 Likes

Hi, the script works and shows colors, I'm not sure what you mean with

neovim(nvim)

Neovim is a more modern vim based text editor. See

And I marked it solved.

2 Likes

It doesn't work on neovim either. I still can't get the themes syntax or background at all.

I am back. I installed vim on my pc and tested myself. That's why it took so much of time.

So, from the above .vimrc file, I believe that you are trying to get nord theme on your vim. I don't know where you got that file from, but I believe that it is wrong / incorrect / need additional instruction. It didn't work on my pc anyway.
If you want nord theme, just install it from AUR
https://aur.archlinux.org/packages/nord-vim/

And your vimrc should look like

syntax on
colorscheme nord

Also, to list all the available vim themes, use command
ls -l /usr/share/vim/vim*/colors/

Btw, there are plenty of theme available in AUR, which are one line install with AUR manager.

I hope this solves the issue.

1 Like

Hello,

Thank you for helping me out, unfortunately I still can't seem to get it working. I tried deleted .vim and .vimrc multiple times and stripping the settings as much as I can.

I used your .vimrc and installed the theme from the AUR but I still have the default colors.

image

I also find that now if TERM=xterm_256color, syntax just isn't highlighted which is odd, and it breaks the "clear" command.

It isn't just the nord theme that doesn't work but it is any theme that I try to apply to vim, it will say it is using it when I do ":colorscheme", but it won't actually reflect it.

Post output of

As text from terminal.

1 Like
/usr/share/vim/vim82/colors/:
drwxr-xr-x    - root 10 Nov 13:49  lists
drwxr-xr-x    - root 10 Nov 13:49  tools
.rw-r--r-- 2.5k root  9 Nov 19:35  blue.vim
.rw-r--r-- 3.0k root  9 Nov 19:35  darkblue.vim
.rw-r--r--  548 root  9 Nov 19:35  default.vim
.rw-r--r-- 2.5k root  9 Nov 19:35  delek.vim
.rw-r--r-- 2.8k root  9 Nov 19:35  desert.vim
.rw-r--r-- 1.7k root  9 Nov 19:35  elflord.vim
.rw-r--r-- 2.5k root  9 Nov 19:35  evening.vim
.rw-r--r-- 2.0k root  9 Nov 19:35  industry.vim
.rw-r--r-- 3.6k root  9 Nov 19:35  koehler.vim
.rw-r--r-- 2.5k root  9 Nov 19:35  morning.vim
.rw-r--r-- 2.0k root  9 Nov 19:35  murphy.vim
.rw-r--r-- 1.0k root  9 Nov 19:35  pablo.vim
.rw-r--r-- 2.7k root  9 Nov 19:35  peachpuff.vim
.rw-r--r-- 3.3k root  9 Nov 19:35  README.txt
.rw-r--r-- 1.4k root  9 Nov 19:35  ron.vim
.rw-r--r-- 2.7k root  9 Nov 19:35  shine.vim
.rw-r--r-- 2.4k root  9 Nov 19:35  slate.vim
.rw-r--r-- 1.6k root  9 Nov 19:35  torte.vim
.rw-r--r-- 1.8k root  9 Nov 19:35  zellner.vim

/usr/share/vim/vimfiles/colors/:
.rw-r--r-- 33k root 30 Nov 13:09  nord.vim

Slight update: I can change the color scheme to other colors, however something very odd happens: Here is my vim with the "blue" theme.

image

By the way, this happens whether I use vim in the terminal or as a the "Vim Editor" application.

Doing some extra digging. I have found that my terminal colours seem to be a bit messed up. Here is the output of:

msgcat --test=color



1 Like

Looks like Dragonised theming to me...

2 Likes

Yes, of course.

But why should the dragonised theming mess with the vim themes?

I’d guess that if the theming includes terminal colour values, and Vim applies colours based on the terminal colour values, then the Vim theme will look different, e.g.

1 Like

Does it output a full, completely smooth rainbow bar?

1 Like