Follow

Hoping someone out there can help me figure out why Base16 syntax highlighting is different in Atom (left) and Vim (right). I can only assume I've done something wrong in my setup.

@gabe It's notoriously hard to get 256 colours working nicely in Vim. Which terminal emulator are you using?

I use tmux inside iTerm and I've got this in my .vimrc:

let &t_8f="\e[38;2;%ld;%ld;%ldm"
let &t_8b="\e[48;2;%ld;%ld;%ldm"
set termguicolors

This is with Vim 8 (which improved 256 colour support, iirc).

@sahil I'm using gnome-terminal. I tried adding the lines you mentioned to my vimrc but it didn't seem to do anything.

I don't think it's an issue with the 256 colorspace, as the colors are displaying correctly, it just seems like the syntax highlighting rules are different in Vim than in Atom. Makes sense, I'm just totally lost as to how to make them the same.

Sign in to participate in the conversation
social.coop

social.coop is a cooperatively-run corner of the Fediverse. The instance is democratically governed by its members, who generally share an interest in the co-op model, but topics of discussion range widely.

If you are interested in joining our community, please review our Bylaws and Code of Conduct. If you agree with them, you may apply for membership on our instance via this link

Our instance is supported by sliding scale contributions of $1-10/mo made via Open Collective. You must have an active Open Collective account to apply for membership; you may set one up here