Comments (11)
Are you setting those styles after your colorscheme
declaration? If you set them before they may get reset by your colorscheme.
For example in your .vimrc
:
colorscheme railscasts
let g:indent_guides_auto_colors = 0
let g:indent_guides_enable_on_vim_startup = 1
hi IndentGuidesOdd guibg=#121212
hi IndentGuidesEven guibg=#262626
If that doesn't work, try this instead:
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=#121212
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=#262626
I do like the idea of adding these in as global options though, might implement that.
from vim-indent-guides.
Like I said, they are part of my colorscheme.
The problem is that your plugin clears the highlight colors when it gets loaded (line 8 of plugin/indent_guides.vim) after my vimrc has already loaded my colorscheme.
from vim-indent-guides.
See #7
from vim-indent-guides.
Ah I see, completely misread your first comment. Pull request looks reasonable, will test it out later today.
from vim-indent-guides.
This bug doesn't seem to affect MacVim for me. I don't mind the fix you've submitted, but it'd be nice if I could see the bug in action. What operating system and vim version are you using so I can try to replicate it?
from vim-indent-guides.
None of that should matter. Vim loads the vimrc before plugins. As it is, things would happen in this order:
hi IndentGuidesOdd guibg=#333333 " my colorscheme via vimrc
hi IndentGuidesOdd guibg=NONE " autoload/indent_guides.vim via plugin/indent_guides.vim
Sure the VimEnter autocmd gets around this problem, but it's telling users "this plugin doesn't do things correctly, so here's how to hack around it" IMO.
And I've seen it in Vim 7.3 on OS X 10.6.6 and Ubuntu 10.10.
from vim-indent-guides.
No, I'm saying it works for me without the VimEnter autocmd. I put the custom highlights in my colorscheme file and it works both before and after your patch.
from vim-indent-guides.
Then your colorscheme is getting loaded after the plugin somehow (manually, autocmd).
from vim-indent-guides.
Regardless, I believe the code is an improvement, thanks for the pull request.
Just for completeness sake, can I get you to confirm that the patch works for you in Terminal Vim?
from vim-indent-guides.
It does.
And I'm guessing you set your colorscheme from gvimrc, which is loaded when the GUI starts (after plugins are loaded).
from vim-indent-guides.
Yep, that's exactly what's happening.
from vim-indent-guides.
Related Issues (20)
- E411: highlight group not found: Normal HOT 4
- modifying tabstops with modelines throws off the colouring HOT 3
- Causes JSON quotes to be hidden when enabled HOT 1
- Indent guides don't appear when second tab is opened HOT 3
- Disable Guides for Terminal Buffers HOT 4
- Error detected <SNR>27 after updating Plugins today HOT 1
- Background color of indent guides not appear in vim on mintty on Windows
- cursor disappearing in white tabs when a light theme is used
- Destroys performance in terminal in neovim only HOT 4
- Licensing HOT 1
- How to disable indent-guides in dashboard preview HOT 1
- How can I set the indent line thinner? HOT 1
- Consider migration to preservim HOT 8
- can someone help me? HOT 1
- open vim with this error, who can help me
- error on execute() when triggered from modeline in neovim
- `listchars` (`lcs`) Colors Overriden when using block tabs HOT 2
- Error with Vim 7.4 only on current 1.6 tag release, not on 1.5 tag
- Can't disable indent guides on terminal in nvim
- anyway to get thin vertical lines instead of thick bars? HOT 1
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 vim-indent-guides.