-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why are my end tags colored differently than my start tags? #124
Comments
Maybe it's possible to use the html syntax style in place of the xml one? |
Question: |
I ended up changing https://github.com/mxw/vim-jsx/blob/master/after/syntax/jsx.vim#L17 to:
It's highlighting better, but not perfect. It would be really appreciated if the read me explained how/where the xml endTag/StartTag syntax highlighting might be defined and how to change it. New-ish to vim and I couldn't find any quick answers on a web search. Edit - after running
It be greatly appreciated to explain what an end-user should do to override the defaults. |
I was able to get this working by adding these lines to my syntax file: hi Tag guifg=#bd9800 guibg=NONE guisp=NONE gui=NONE ctermfg=11 ctermbg=NONE cterm=NONE
hi xmlTag guifg=#bd9800 guibg=NONE guisp=NONE gui=NONE ctermfg=11 ctermbg=NONE cterm=NONE
hi xmlTagName guifg=#bd9800 guibg=NONE guisp=NONE gui=NONE ctermfg=11 ctermbg=NONE cterm=NONE
hi xmlEndTag guifg=#bd9800 guibg=NONE guisp=NONE gui=NONE ctermfg=11 ctermbg=NONE cterm=NONE
|
Revisiting this since my earlier suggestion was a fail and @Ameobea seems to have made some progress. @Ameobea is there any reason why you explicitly set I use base16-vim and only had to add the following to my vimrc:
|
@nikolowry I literally just copied the |
Thanks for the quick reply @Ameobea - just trying to find the best solution to include in my vimrc for cross-colorscheme support. |
Create
You should be able to style the angle brackets and tag names separately using |
My problem here was that the jsx was parsed as I hacked that into the colorscheme, but I didn't like the solution... So i sent hunting for other plugins and I found https://github.com/neoclide/vim-jsx-improve this does a better job than chemzqm/vim-jsx-improve w/ & w/o pangloss - end tag called
|
Could |
Hi folks, Could someone summarize what the action items here are? I only recently figured out why I wasn't getting notifications from this repo, so I'm inferring that there are two distinct issues here:
|
If there are any action items or issues in this thread I've missed, please let me know. |
I agree that this is an XML syntax highlighting issue and that it falls outside of the scope of this project. My earlier comment addresses how to add syntax rules that customize the default behavior. More detailed information is available through |
I use base16 and find that @nikolowry suggested works flawlessly.
|
@aesnyder that worked for me sort of. It really made all my tags white and not have highlighting. If anyone else encounters this they can try
Which I found just by searching xml issues: https://stackoverflow.com/questions/39628500/xml-syntax-highlighting-vim-colorscheme-fix Which by guessing it is a way to force the editor to match the start and end tags |
@avocadoras you can put it in your .vimrc |
If I understand correctly, nobody has managed to make the brackets ( |
On a Linux system write the following commands: #vim82 for my current version of vim which is 8.2
If you move to line 263, you'll get "The default highlighting:", and subsequent lines
Change these as follows:
If you also seek to match the colors of the tags with tag names then change
I hope this will help. |
I know the README addresses this issue - but I can't help but feel it's only partially complete. Is there any way we could add how to resolve this issue?
If I knew how to actually resolve this issue I'd submit a PR but...
The text was updated successfully, but these errors were encountered: