Closed hvsouza closed 1 year ago
I can't remember the exact reasons, but I think it has to do with :syntax reset
and some after/syntax
files here. Try :edit
or :edit!
(the latter only if you are ok losing unsaved changes, or after :write
ing the file) to re-trigger syntax loading. Possibly :syntax enable
would also work.
Alternatively, guard against re-executing :colorscheme
by checking g:colors_name
.
Thanks @benknoble!
Using syntax on
after loading the theme solved the problem. Sorry for the very silly question
Using
syntax on
after loading the theme solved the problem.
Glad to hear! Consider :syntax enable
instead, which will do the right thing with your custom highlights:
*:syn-on* *:syntax-on*
The `:syntax enable` command will keep most of your current color settings.
This allows using `:highlight` commands to set your preferred colors before or
after using this command. If you want Vim to overrule your settings with the
defaults, use: >
:syntax on
<
Sorry for the very silly question
It's not silly; don't be sorry!
Done, thanks again :)
What happened
Whenever I source the .vimrc file again, it change the theme and lose the configuration of a few characters. Please, although the screenshot was done in a tmux session, the problem persist in a clean terminal with xterm-256color
What I expected to happen
No change in the colors after executing ":so %" on .vimrc file
Screenshot
Machine Info
-Vim type (
vim
/gvim
/neovim
): vimVim version: 8.2.4919 and 9.0.1429
OS: Linux henrique 5.19.0-38-generic #39~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 17 21:16:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Terminal/Terminal Emulator/VTE: Terminator and Alacritty
TERM
environment variable: xterm-256color and screen-256color (tmux)Additional Info
If needed I can post my tmux info, but the behavior was noticed also without using tmux