Comments (19)
Thanks, I'll take a look.
from vim-indent-guides.
@nathanaelkane Awesome, thanks!
from vim-indent-guides.
Should be fixed by ac069a9, let me know how it goes for you.
from vim-indent-guides.
@nathanaelkane Well actually the problem remains. :/
However it is an improvement now, because it atleast doesn't disappear entirely. :)
from vim-indent-guides.
No worries, reopening issue.
So the indent guides appear, but they're using incorrect settings?
from vim-indent-guides.
OK, here's a more step by step guide.
Open a file that has tabs. Now somehow source your .vimrc file (:source $MYVIMRC
), do you notice the highlighting disappears for some reason? OK, to re-enable this plugin's effect, try doing <leader>ig
twice, they should re-appear again.
If it doesn't work, try doing the same test but with the file you're editing being your .vimrc.
from vim-indent-guides.
@nathanaelkane BUMP! 😄
from vim-indent-guides.
Try :redraw
instead of <leader>ig
twice.
from vim-indent-guides.
Thanks for the suggestion @graywh!
I'm afraid it doesn't work though. :(
It's gotta be <leader>ig
or the highlighting doesn't appear again...
from vim-indent-guides.
Compare the result of :echo getmatches
before and after sourcing your vimrc.
from vim-indent-guides.
@graywh Ugh... A little too long... OK here it is before:
[{'group': 'solarizedTrailingSpace', 'pattern': '\s\+$', 'priority': 10, 'id': 1}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%1v\zs\s*\%2v\ze', 'priority': 10, 'id': 64}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%1v\zs\t*\%5v\ze', 'priority': 10, 'id': 65}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%5v\zs\s*\%6v\ze', 'priority': 10, 'id': 66}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%5v\zs\t*\%9v\ze', 'priority': 10, 'id': 67}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%9v\zs\s*\%10v\ze', 'priority': 10, 'id': 68}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%9v\zs\t*\%13v\ze', 'priority': 10, 'id': 69}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%13v\zs\s*\%14v\ze', 'priority': 10, 'id': 70}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%13v\zs\t*\%17v\ze', 'priority': 10, 'id': 71}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%17v\zs\s*\%18v\ze', 'priority': 10, 'id': 72}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%17v\zs\t*\%21v\ze', 'priority': 10, 'id': 73}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%21v\zs\s*\%22v\ze', 'priority': 10, 'id': 74}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%21v\zs\t*\%25v\ze', 'priority': 10, 'id': 75}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%25v\zs\s*\%26v\ze', 'priority': 10, 'id': 76}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%25v\zs\t*\%29v\ze', 'priority': 10, 'id': 77}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%29v\zs\s*\%30v\ze', 'priority': 10, 'id': 78}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%29v\zs\t*\%33v\ze', 'priority': 10, 'id': 79}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%33v\zs\s*\%34v\ze', 'priority': 10, 'id': 80}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%33v\zs\t*\%37v\ze', 'priority': 10, 'id': 81}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%37v\zs\s*\%38v\ze', 'priority': 10, 'id': 82}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%37v\zs\t*\%41v\ze', 'priority': 10, 'id': 83}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%41v\zs\s*\%42v\ze', 'priority': 10, 'id': 84}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%41v\zs\t*\%45v\ze', 'priority': 10, 'id': 85}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%45v\zs\s*\%46v\ze', 'priority': 10, 'id': 86}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%45v\zs\t*\%49v\ze', 'priority': 10, 'id': 87}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%49v\zs\s*\%50v\ze', 'priority': 10, 'id': 88}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%49v\zs\t*\%53v\ze', 'priority': 10, 'id': 89}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%53v\zs\s*\%54v\ze', 'priority': 10, 'id': 90}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%53v\zs\t*\%57v\ze', 'priority': 10, 'id': 91}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%57v\zs\s*\%58v\ze', 'priority': 10, 'id': 92}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%57v\zs\t*\%61v\ze', 'priority': 10, 'id': 93}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%61v\zs\s*\%62v\ze', 'priority': 10, 'id': 94}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%61v\zs\t*\%65v\ze', 'priority': 10, 'id': 95}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%65v\zs\s*\%66v\ze', 'priority': 10, 'id': 96}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%65v\zs\t*\%69v\ze', 'priority': 10, 'id': 97}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%69v\zs\s*\%70v\ze', 'priority': 10, 'id': 98}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%69v\zs\t*\%73v\ze', 'priority': 10, 'id': 99}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%73v\zs\s*\%74v\ze', 'priority': 10, 'id': 100}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%73v\zs\t*\%77v\ze', 'priority': 10, 'id': 101}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%77v\zs\s*\%78v\ze', 'priority': 10, 'id': 102}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%77v\zs\t*\%81v\ze', 'priority': 10, 'id': 103}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%81v\zs\s*\%82v\ze', 'priority': 10, 'id': 104}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%81v\zs\t*\%85v\ze', 'priority': 10, 'id': 105}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%85v\zs\s*\%86v\ze', 'priority': 10, 'id': 106}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%85v\zs\t*\%89v\ze', 'priority': 10, 'id': 107}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%89v\zs\s*\%90v\ze', 'priority': 10, 'id': 108}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%89v\zs\t*\%93v\ze', 'priority': 10, 'id': 109}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%93v\zs\s*\%94v\ze', 'priority': 10, 'id': 110}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%93v\zs\t*\%97v\ze', 'priority': 10, 'id': 111}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%97v\zs\s*\%98v\ze', 'priority': 10, 'id': 112}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%97v\zs\t*\%101v\ze', 'priority': 10, 'id': 113}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%101v\zs\s*\%102v\ze', 'priority': 10, 'id': 114}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%101v\zs\t*\%105v\ze', 'priority': 10, 'id': 115}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%105v\zs\s*\%106v\ze', 'priority': 10, 'id': 116}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%105v\zs\t*\%109v\ze', 'priority': 10, 'id': 117}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%109v\zs\s*\%110v\ze', 'priority': 10, 'id': 118}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%109v\zs\t*\%113v\ze', 'priority': 10, 'id': 119}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%113v\zs\s*\%114v\ze', 'priority': 10, 'id': 120}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%113v\zs\t*\%117v\ze', 'priority': 10, 'id': 121}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%117v\zs\s*\%118v\ze', 'priority': 10, 'id': 122}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%117v\zs\t*\%121v\ze', 'priority': 10, 'id': 123}]
and here it is after:
[{'group': 'IndentGuidesOdd', 'pattern': '^\s*\%1v\zs\s*\%2v\ze', 'priority': 10, 'id': 184}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%1v\zs\t*\%5v\ze', 'priority': 10, 'id': 185}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%5v\zs\s*\%6v\ze', 'priority': 10, 'id': 186}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%5v\zs\t*\%9v\ze', 'priority': 10, 'id': 187}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%9v\zs\s*\%10v\ze', 'priority': 10, 'id': 188}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%9v\zs\t*\%13v\ze', 'priority': 10, 'id': 189}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%13v\zs\s*\%14v\ze', 'priority': 10, 'id': 190}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%13v\zs\t*\%17v\ze', 'priority': 10, 'id': 191}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%17v\zs\s*\%18v\ze', 'priority': 10, 'id': 192}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%17v\zs\t*\%21v\ze', 'priority': 10, 'id': 193}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%21v\zs\s*\%22v\ze', 'priority': 10, 'id': 194}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%21v\zs\t*\%25v\ze', 'priority': 10, 'id': 195}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%25v\zs\s*\%26v\ze', 'priority': 10, 'id': 196}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%25v\zs\t*\%29v\ze', 'priority': 10, 'id': 197}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%29v\zs\s*\%30v\ze', 'priority': 10, 'id': 198}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%29v\zs\t*\%33v\ze', 'priority': 10, 'id': 199}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%33v\zs\s*\%34v\ze', 'priority': 10, 'id': 200}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%33v\zs\t*\%37v\ze', 'priority': 10, 'id': 201}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%37v\zs\s*\%38v\ze', 'priority': 10, 'id': 202}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%37v\zs\t*\%41v\ze', 'priority': 10, 'id': 203}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%41v\zs\s*\%42v\ze', 'priority': 10, 'id': 204}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%41v\zs\t*\%45v\ze', 'priority': 10, 'id': 205}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%45v\zs\s*\%46v\ze', 'priority': 10, 'id': 206}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%45v\zs\t*\%49v\ze', 'priority': 10, 'id': 207}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%49v\zs\s*\%50v\ze', 'priority': 10, 'id': 208}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%49v\zs\t*\%53v\ze', 'priority': 10, 'id': 209}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%53v\zs\s*\%54v\ze', 'priority': 10, 'id': 210}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%53v\zs\t*\%57v\ze', 'priority': 10, 'id': 211}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%57v\zs\s*\%58v\ze', 'priority': 10, 'id': 212}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%57v\zs\t*\%61v\ze', 'priority': 10, 'id': 213}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%61v\zs\s*\%62v\ze', 'priority': 10, 'id': 214}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%61v\zs\t*\%65v\ze', 'priority': 10, 'id': 215}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%65v\zs\s*\%66v\ze', 'priority': 10, 'id': 216}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%65v\zs\t*\%69v\ze', 'priority': 10, 'id': 217}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%69v\zs\s*\%70v\ze', 'priority': 10, 'id': 218}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%69v\zs\t*\%73v\ze', 'priority': 10, 'id': 219}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%73v\zs\s*\%74v\ze', 'priority': 10, 'id': 220}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%73v\zs\t*\%77v\ze', 'priority': 10, 'id': 221}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%77v\zs\s*\%78v\ze', 'priority': 10, 'id': 222}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%77v\zs\t*\%81v\ze', 'priority': 10, 'id': 223}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%81v\zs\s*\%82v\ze', 'priority': 10, 'id': 224}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%81v\zs\t*\%85v\ze', 'priority': 10, 'id': 225}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%85v\zs\s*\%86v\ze', 'priority': 10, 'id': 226}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%85v\zs\t*\%89v\ze', 'priority': 10, 'id': 227}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%89v\zs\s*\%90v\ze', 'priority': 10, 'id': 228}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%89v\zs\t*\%93v\ze', 'priority': 10, 'id': 229}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%93v\zs\s*\%94v\ze', 'priority': 10, 'id': 230}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%93v\zs\t*\%97v\ze', 'priority': 10, 'id': 231}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%97v\zs\s*\%98v\ze', 'priority': 10, 'id': 232}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%97v\zs\t*\%101v\ze', 'priority': 10, 'id': 233}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%101v\zs\s*\%102v\ze', 'priority': 10, 'id': 234}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%101v\zs\t*\%105v\ze', 'priority': 10, 'id': 235}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%105v\zs\s*\%106v\ze', 'priority': 10, 'id': 236}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%105v\zs\t*\%109v\ze', 'priority': 10, 'id': 237}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%109v\zs\s*\%110v\ze', 'priority': 10, 'id': 238}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%109v\zs\t*\%113v\ze', 'priority': 10, 'id': 239}, {'group': 'IndentGuidesOdd', 'pattern': '^\s*\%113v\zs\s*\%114v\ze', 'priority': 10, 'id': 240}, {'group': 'IndentGuidesOdd', 'pattern': '^\t*\%113v\zs\t*\%117v\ze', 'priority': 10, 'id': 241}, {'group': 'IndentGuidesEven', 'pattern': '^\s*\%117v\zs\s*\%118v\ze', 'priority': 10, 'id': 242}, {'group': 'IndentGuidesEven', 'pattern': '^\t*\%117v\zs\t*\%121v\ze', 'priority': 10, 'id': 243}, {'group': 'solarizedTrailingSpace', 'pattern': '\s\+$', 'priority': 10, 'id': 1}]
Phew, this stuff saves your life: http://stackoverflow.com/q/2573021/1622940
from vim-indent-guides.
That looks fine. This time, compare :hi IndentGuidesEven
and :hi IndentGuidesOdd
before and after sourcing your vimrc.
from vim-indent-guides.
Before:
IndentGuidesEven xxx guifg=#0C3540 guibg=#183F49
IndentGuidesOdd xxx guifg=#183F49 guibg=#0C3540
After:
IndentGuidesEven xxx guifg=#0C3540 guibg=#183F49
IndentGuidesOdd xxx guifg=#183F49 guibg=#0C3540
They're the same both times...
from vim-indent-guides.
After commit ac069a9 I can no longer replicate this problem.
However it is an improvement now, because it atleast doesn't disappear entirely.
Can you post a screenshot so I can see what you mean, here's a good example file you can use: https://raw.github.com/nathanaelkane/vim-indent-guides/master/test-files/test-ts8sw8noet.txt (with tabs)
Also, can you please post the following:
- The settings you use with this plugin
- The colorscheme you're using
I'll test with your settings and see if I can replicate the problem.
from vim-indent-guides.
Actually, that example file I mentioned may not be ideal to test with as it loads ts/sw settings via a modeline. So use your own file for the screenshot, but take a before and after shot.
from vim-indent-guides.
Just pushed 0421be2 Trigger BufEnter and process modelines after loading the colorscheme.
which may be related. Update to latest HEAD and let me know how it goes.
from vim-indent-guides.
Thanks for taking your time to fix this.:)
I tried the latest commit but it didn't work. :(
This happens with all my themes. Related settings in my .vimrc
file:
https://github.com/Greduan/dotfiles/blob/a0c31a59a1593a5a848f4c5b20569a0f2211e2a5/vim/vimrc.vim#L566-L568
https://github.com/Greduan/dotfiles/blob/a0c31a59a1593a5a848f4c5b20569a0f2211e2a5/vim/vimrc.vim#L673-L674
Settings with this plugin:
https://github.com/Greduan/dotfiles/blob/a0c31a59a1593a5a848f4c5b20569a0f2211e2a5/vim/vimrc.vim#L217-L223
from vim-indent-guides.
The problem appears to be the VimReload
augroup you have in your vimrc.vim
. Commenting out the following lines seems to fix the issue.
" Reload .vimrc and .gvimrc files as soon as they have a change
augroup VimReload
autocmd!
autocmd BufWritePost $MYVIMRC source $MYVIMRC
autocmd BufWritePost $MYGVIMRC source $MYGVIMRC
augroup END
from vim-indent-guides.
I see, thanks for finding that! :D
I wonder why though... :/
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.