Skip to content
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

^ and _ highlighted as red #210

Open
Turgon-Aran-Gondolin opened this issue Nov 13, 2017 · 1 comment
Open

^ and _ highlighted as red #210

Turgon-Aran-Gondolin opened this issue Nov 13, 2017 · 1 comment

Comments

@Turgon-Aran-Gondolin
Copy link

In my tex file ^ and _ are highlighted as red. Now I know tex isn't supported yet but I really like this color scheme so is there a way to work around that?

@kiryph
Copy link

kiryph commented Apr 4, 2018

You should also check following two reasons:

screen shot 2018-04-04 at 13 16 29

  1. ^ and _ are used outside of a math env:
					*tex-error* *g:tex_no_error*
 Tex: Excessive Error Highlighting? ~

The <tex.vim> supports lexical error checking of various sorts.  Thus,
although the error checking is ofttimes very useful, it can indicate
errors where none actually are.  If this proves to be a problem for you,
you may put in your <.vimrc> the following statement: >
	let g:tex_no_error=1
and all error checking by <syntax/tex.vim> will be suppressed.
  1. ^ and _ are use inside a math env not recognised by $VIMRUNTIME/syntax/tex.vim:
								*tex-math*
 Tex: Need a new Math Group? ~

If you want to include a new math group in your LaTeX, the following
code shows you an example as to how you might do so: >
	call TexNewMathZone(sfx,mathzone,starform)
You'll want to provide the new math group with a unique suffix
(currently, A-L and V-Z are taken by <syntax/tex.vim> itself).
As an example, consider how eqnarray is set up by <syntax/tex.vim>: >
	call TexNewMathZone("D","eqnarray",1)
You'll need to change "mathzone" to the name of your new math group,
and then to the call to it in .vim/after/syntax/tex.vim.
The "starform" variable, if true, implies that your new math group
has a starred form (ie. eqnarray*).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants