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

wrong completion \\[2cm] #26

Closed
jonasstein opened this issue Feb 4, 2018 · 3 comments
Closed

wrong completion \\[2cm] #26

jonasstein opened this issue Feb 4, 2018 · 3 comments
Labels

Comments

@jonasstein
Copy link
Contributor

when typing
test\\[
Texstudio completes to test\\[\], which is wrong. Is there a way to disable this?

selection_465
selection_466

@timhoffm
Copy link
Member

timhoffm commented Feb 4, 2018

I don't think there is. Parentheses are defined via the qnfa file. As far as I understand them, it's not possible to distinguish \[ from \\[.

@jonasstein
Copy link
Contributor Author

can I disable \[ completion at least? I grep 'ed some files but did not find anything useful.

@timhoffm
Copy link
Member

timhoffm commented Feb 4, 2018

You can disable completion for all parentheses at Options -> Advanced Editor -> Special Options -> Auto Complete Parentheses.

If you want to keep completion for other parentheses, you would have to not-define \[ as a parentheses by modifying the language definiton.

Warning: Be sure you understand the implications:

1. Defining your own language definition overrides the built-in TeX language definition. You will only see your version. You are decoupled from any changes we might make to the built-in definition in future releases.

2. We expose the language specification to you as end-user to give you more flexibility in adapting TeXstudio to your needs. But you should take it as is, because we don't have the capacity to give support here.

If you still want to do this:

  1. Get a copy of tex.qnfa from the repo.
  2. Create a folder languages in your settings directory and place the file therein.
  3. Edit your version of tex.qnfa. Basically delete
	<sequence parenthesis="square:open" parenthesisWeight="00" fold="true">\[</sequence>
	<sequence parenthesis="square:close" parenthesisWeight="00" fold="true">\]</sequence>
  1. Restart TeXstudio.

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

No branches or pull requests

3 participants