Comments (1)
I don't know why Vim behaves like this, but it's not due to any of the color schemes, including Zenburn. I think you also, like me, will see the same behaviour with any color scheme.
A symptom seems to be that when things look OK the pythonInclude highlight group maps to Include highlight group, and when things are broken, there are no highlight groups defined, at all. I suspect something either with Vim internals or with the filetype plugin since the detected syntax is re-set to nothing.
As a quick remedy, you can do :e!
to re-load the file, the syntax highlights should re-appear.
Or, you can set syntax=python
.
I can sort of kind of reproduce the issue when re-loading a testrc (see below) with :so ~/testrc
in a running Vim. Upon :e!
things are back to normal, at least for me.
To illustrate how the highlight groups vanish, I did :set nocompatible
then this:
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
Then, with the cursor at the "import" in the "import itertools"-line (or "from"-line, just as same) I hit F10 and got:
hi<pythonInclude> trans<pythonInclude> lo<Include>
This means the pythonInclude group maps to Include, which it should.
With the "all white" mode triggered sometimes by re-sourcing the testrc, I just get:
hi<> trans<> lo<>
i.e. the whole syntax was cleared.
I was able to trigger the issue with other colorschemes too.
FYI the minimal .vimrc I used when investigating was:
$ cat testrc
"set nocompatible
set t_Co=256
syntax on
colorscheme zenburn
Then I did: vim -u testrc test.py
(with the .py contents as in your example).
The file shows up fine initially for me, though my Vim is a bit earlier version than yours.
from zenburn.
Related Issues (20)
- New URL for the repo HOT 1
- New Themes for Atom.io HOT 1
- problem with colors in ConEmu HOT 7
- requesting an improved scala theme HOT 1
- underline in YAML files HOT 1
- Cursor is too Dark HOT 4
- zenburnpage goes 404 HOT 1
- Terminal field hasn't been set? HOT 1
- Conceal colors HOT 1
- http://kippura.org/zenburnpage returns http error 404 HOT 1
- Make comments italic in terminal HOT 1
- Vim 8 terminal colours HOT 13
- Terminal Ansi Colors twisted? HOT 3
- What's this font family in screenshot? HOT 4
- Error when loading zenburn colorscheme HOT 3
- Does Zenburn work better in terms of syntax highlighting with vim-polyglot? HOT 2
- Cannot install it after updating phpstorm 2023.3.1 HOT 1
- Add `cterm=bold` to `hi TabLineFill` commands HOT 1
- contrast too low for highlighted background of snippet placeholders HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zenburn.