Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

Post Timeline

added 490 characters in body
Source Link
Nadir Sampaoli
  • 5.6k
  • 4
  • 24
  • 34

My attempts These are the commands I used in various combination, to no avail:

:syntax off
:syntax clear
:hi clear
:syntax reset

The only thing that works (obviously!) is redefining by hand the hi link commands missing in the "simple" colorscheme. But of course this is no different by using the other colorscheme (like Solarized) with changed colors. Of course this is not a solution to the question "How do you remove highlighting groups leftovers?".

My attempts These are the commands I used in various combination, to no avail:

:syntax off
:syntax clear
:hi clear
:syntax reset

The only thing that works (obviously!) is redefining by hand the hi link commands missing in the "simple" colorscheme. But of course this is no different by using the other colorscheme (like Solarized) with changed colors. Of course this is not a solution to the question "How do you remove highlighting groups leftovers?".

Correct title and minor fixes
Source Link
Nadir Sampaoli
  • 5.6k
  • 4
  • 24
  • 34

UPDATE (2013年03月02日):

I think I can finally express exactly what I mean(I still couldn't find the correct command, assuming it even exists!). Basically this is the flow:
  1. start session with a small footprint colorscheme which defines few basic groups (like Statement, Comment, Function);
  2. switch to a "larger" colorscheme (like Solarized or Jellybeans), which defines more specific groups (like vimCommand, hsImport or rubyBeginEnd). These more specific groups override basic ones;
  3. switch back to a "smaller" colorscheme (one which doesn't define specific groups).

The result is that the session is cluttered with "homeless" group that obscure the basic ones and prevent some words to be highlighted at all. These homeless groups look like the following:

INPUT:hi vimCommand Enter
OUTPUTvimCommand xxx cleared

By the way something similar is experienced and issued in the Solarized's github issue tracker → Vim colorscheme leaves a wake of destruction when switching away


UPDATE (2012年11月25日):

Probably, a good solution would be clearing the current session's "highlight" variables(I'm not talking about variables like `smartindent`, `encoding`, `number`, but rather about variables like `Statement`, `Comment` `rubyClass`, `xmlTag`, i.e. the ones defined by commands like `hi link...`, `highlight...`, etc.).If anyone could explain how it is stored in memory, it could maybe help me figuring out how to clean it away(I've tried saving a session through `:mksession mysession.vim` and then looking into it, but there's no trace of any syntax highlighting variable).

Also, and this is just a vague supposition, it seems that the reason why :hi clear doesn't clean up the highlight groups is that the "leftovers" were defined through an indirect definition (e.g. hi link).


Original:

When my default colorscheme (a modified version of blueshift) is loaded every tag that should be highlighted is correctly coloured.
enter image description here


UPDATE (2012年11月25日):

Probably, a good solution would be clearing the current session's "highlight" variables(I'm not talking about variables like `smartindent`, `encoding`, `number`, but rather about variables like `Statement`, `Comment` `rubyClass`, `xmlTag`, i.e. the ones defined by commands like `hi link...`, `highlight...`, etc.).If anyone could explain how it is stored in memory, it could maybe help me figuring out how to clean it away(I've tried saving a session through `:mksession mysession.vim` and then looking into it, but there's no trace of any syntax highlighting variable).

Also, and this is just a vague supposition, it seems that the reason why :hi clear doesn't clean up the highlight groups is that the "leftovers" were defined through an indirect definition (e.g. hi link).

When my default colorscheme (a modified version of blueshift) is loaded every tag that should be highlighted is correctly coloured.
enter image description here


UPDATE (2012年11月25日):

Probably, a good solution would be clearing the current session's "highlight" variables(I'm not talking about variables like `smartindent`, `encoding`, `number`, but rather about variables like `Statement`, `Comment` `rubyClass`, `xmlTag`, i.e. the ones defined by commands like `hi link...`, `highlight...`, etc.).If anyone could explain how it is stored in memory, it could maybe help me figuring out how to clean it away(I've tried saving a session through `:mksession mysession.vim` and then looking into it, but there's no trace of any syntax highlighting variable).

Also, and this is just a vague supposition, it seems that the reason why :hi clear doesn't clean up the highlight groups is that the "leftovers" were defined through an indirect definition (e.g. hi link).

UPDATE (2013年03月02日):

I think I can finally express exactly what I mean(I still couldn't find the correct command, assuming it even exists!). Basically this is the flow:
  1. start session with a small footprint colorscheme which defines few basic groups (like Statement, Comment, Function);
  2. switch to a "larger" colorscheme (like Solarized or Jellybeans), which defines more specific groups (like vimCommand, hsImport or rubyBeginEnd). These more specific groups override basic ones;
  3. switch back to a "smaller" colorscheme (one which doesn't define specific groups).

The result is that the session is cluttered with "homeless" group that obscure the basic ones and prevent some words to be highlighted at all. These homeless groups look like the following:

INPUT:hi vimCommand Enter
OUTPUTvimCommand xxx cleared

By the way something similar is experienced and issued in the Solarized's github issue tracker → Vim colorscheme leaves a wake of destruction when switching away


UPDATE (2012年11月25日):

Probably, a good solution would be clearing the current session's "highlight" variables(I'm not talking about variables like `smartindent`, `encoding`, `number`, but rather about variables like `Statement`, `Comment` `rubyClass`, `xmlTag`, i.e. the ones defined by commands like `hi link...`, `highlight...`, etc.).If anyone could explain how it is stored in memory, it could maybe help me figuring out how to clean it away(I've tried saving a session through `:mksession mysession.vim` and then looking into it, but there's no trace of any syntax highlighting variable).

Also, and this is just a vague supposition, it seems that the reason why :hi clear doesn't clean up the highlight groups is that the "leftovers" were defined through an indirect definition (e.g. hi link).


Original:

When my default colorscheme (a modified version of blueshift) is loaded every tag that should be highlighted is correctly coloured.
enter image description here

Correct title and minor fixes
Source Link
Nadir Sampaoli
  • 5.6k
  • 4
  • 24
  • 34

gVim: reset session cache (particularlyremove syntax highlighting definitions)groups

Original title was «Language-specific color-schemes prevent simpler ones from coloring certain language-specific tags»

I'm using gVim 7.3 on both Ubuntu 12.04 and Arch x86/64(on (削除) Ubuntu 12.04 (削除ここまで) Arch x86/64, for that matters).

When my default colorscheme (a modified version of blueshift) is loaded every tag that should be highlighted is correctly coloured.
enter image description here

During the session, I switch to jellybeans colorscheme (:colo jellybeans), which has many more options than my default color-scheme:
jellybeans.vim

If I switch again to my default colorscheme (:colo blueshifted), some highlighting is disabled:
enter image description here

It seems that at the beginning of the session if I use a color-scheme that doesn't specify the behaviour for some language-specific tags, those tags are auto-coloured using some existing colors.

I know that jellybeans's language-specific tags remain in the "cache" and are the responsible for disabling the auto-coloring feature, because if I switch between colorschemes that don't have language-specific tags (without ever using jellybeans), the auto-coloring isn't ruined.

The same happens with other color-schemes (for example railscasts.vim uses HTML-specific coloring). I know I can solve the issue by adding the missing tags in the less-specific color-scheme, but I'm looking for a more general solution.

The Questions

  • what can I do to avoid that these auto-setting colors (used when the first color-scheme is loaded) are disabled when a less detailed color-scheme is loaded after a more-detailed color-scheme?

  • Can I clean up the session cache (i.e. remove the specific tags used by jellybeans.vim from the "session cache") when I change color-scheme?


UPDATE (2012年11月25日):

Probably, a good solution would be clearing the current session's "highlight" variables (I'm not talking about variables like `smartindent`, `encoding`, `number`, but rather about variables like `Statement`, `Comment` `rubyClass`, `xmlTag`, i.e. the ones defined by commands like `hi link ...`, `highlight ...`, etc.). If anyone could explain how it is stored in memory, it could maybe help me figuring out how to clean it away (I've tried saving a session through `:mksession mysession.vim` and then looking into it, but there's no trace of any syntax highlighting variable).

Also, and this is just a vague supposition, it seems that the reason why :hi clear doesn't clean up the highlight variablesgroups is that the "leftovers" were defined through an indirect definition (e.g. hi link).

gVim: reset session cache (particularly syntax highlighting definitions)

Original title was «Language-specific color-schemes prevent simpler ones from coloring certain language-specific tags»

I'm using gVim 7.3 on both Ubuntu 12.04 and Arch x86/64.

When my default colorscheme (a modified version of blueshift) is loaded every tag that should be highlighted is correctly coloured.
enter image description here

During the session, I switch to jellybeans colorscheme (:colo jellybeans), which has many more options than my default color-scheme:
jellybeans.vim

If I switch again to my default colorscheme (:colo blueshifted), some highlighting is disabled:
enter image description here

It seems that at the beginning of the session if I use a color-scheme that doesn't specify the behaviour for some language-specific tags, those tags are auto-coloured using some existing colors.

I know that jellybeans's language-specific tags remain in the "cache" and are the responsible for disabling the auto-coloring feature, because if I switch between colorschemes that don't have language-specific tags (without ever using jellybeans), the auto-coloring isn't ruined.

The same happens with other color-schemes (for example railscasts.vim uses HTML-specific coloring). I know I can solve the issue by adding the missing tags in the less-specific color-scheme, but I'm looking for a more general solution.

The Questions

  • what can I do to avoid that these auto-setting colors (used when the first color-scheme is loaded) are disabled when a less detailed color-scheme is loaded after a more-detailed color-scheme?

  • Can I clean up the session cache (i.e. remove the specific tags used by jellybeans.vim from the "session cache") when I change color-scheme?


UPDATE (2012年11月25日):

Probably, a good solution would be clearing the current session's "highlight" variables (I'm not talking about variables like `smartindent`, `encoding`, `number`, but rather about variables like `Statement`, `Comment` `rubyClass`, `xmlTag`, i.e. the ones defined by commands like `hi link ...`, `highlight ...`, etc.). If anyone could explain how it is stored in memory, it could maybe help me figuring out how to clean it away (I've tried saving a session through `:mksession mysession.vim` and then looking into it, but there's no trace of any syntax highlighting variable).

Also, and this is just a vague supposition, it seems that the reason why :hi clear doesn't clean up the highlight variables is that the "leftovers" were defined through an indirect definition (e.g. hi link).

gVim: remove syntax highlighting groups

Original title was «Language-specific color-schemes prevent simpler ones from coloring certain language-specific tags»

I'm using gVim 7.3 (on (削除) Ubuntu 12.04 (削除ここまで) Arch x86/64, for that matters).

When my default colorscheme (a modified version of blueshift) is loaded every tag that should be highlighted is correctly coloured.
enter image description here

During the session, I switch to jellybeans colorscheme (:colo jellybeans), which has many more options than my default color-scheme:
jellybeans.vim

If I switch again to my default colorscheme (:colo blueshifted), some highlighting is disabled:
enter image description here

It seems that at the beginning of the session if I use a color-scheme that doesn't specify the behaviour for some language-specific tags, those tags are auto-coloured using some existing colors.

I know that jellybeans's language-specific tags remain in the "cache" and are the responsible for disabling the auto-coloring feature, because if I switch between colorschemes that don't have language-specific tags (without ever using jellybeans), the auto-coloring isn't ruined.

The same happens with other color-schemes (for example railscasts.vim uses HTML-specific coloring). I know I can solve the issue by adding the missing tags in the less-specific color-scheme, but I'm looking for a more general solution.

The Questions

  • what can I do to avoid that these auto-setting colors (used when the first color-scheme is loaded) are disabled when a less detailed color-scheme is loaded after a more-detailed color-scheme?

  • Can I clean up the session cache (i.e. remove the specific tags used by jellybeans.vim from the "session cache") when I change color-scheme?


UPDATE (2012年11月25日):

Probably, a good solution would be clearing the current session's "highlight" variables (I'm not talking about variables like `smartindent`, `encoding`, `number`, but rather about variables like `Statement`, `Comment` `rubyClass`, `xmlTag`, i.e. the ones defined by commands like `hi link ...`, `highlight ...`, etc.). If anyone could explain how it is stored in memory, it could maybe help me figuring out how to clean it away (I've tried saving a session through `:mksession mysession.vim` and then looking into it, but there's no trace of any syntax highlighting variable).

Also, and this is just a vague supposition, it seems that the reason why :hi clear doesn't clean up the highlight groups is that the "leftovers" were defined through an indirect definition (e.g. hi link).

added 21 characters in body
Source Link
Nadir Sampaoli
  • 5.6k
  • 4
  • 24
  • 34
Loading
added 148 characters in body
Source Link
Nadir Sampaoli
  • 5.6k
  • 4
  • 24
  • 34
Loading
added 687 characters in body; edited tags; edited title
Source Link
Nadir Sampaoli
  • 5.6k
  • 4
  • 24
  • 34
Loading
added 462 characters in body
Source Link
Nadir Sampaoli
  • 5.6k
  • 4
  • 24
  • 34
Loading
added 462 characters in body
Source Link
Nadir Sampaoli
  • 5.6k
  • 4
  • 24
  • 34
Loading
Source Link
Nadir Sampaoli
  • 5.6k
  • 4
  • 24
  • 34
Loading

AltStyle によって変換されたページ (->オリジナル) /