2

I am using overleaf and one of the features that I find extremely useful is that when you press enter on a suggestion that pops up in the autocomplete menu, if that selected suggestion has brackets, it will allow you to then press tab to move the cursor from one bracket to the next. For example, if one types \frac, it will come up with \frac{}{} on the autocomplete menu. If you then press enter, you can then type something in the first bracket, press tab, and it will automatically move the cursor to the second bracket. Once you finish typing in the second bracket you can then press tab again and it will move the cursor to be outside the second bracket.

Here is an example:

enter image description here

However, if I create a newcommand that has parameters, then sometimes it will appear with the curly brackets in the autocomplete menu, and hence allow me to move throughout the brackets by just pressing tab.

Example:

enter image description here

However, sometimes when I create a newcommand, it does not do this.

Example:

not showing brackets

As you can see in this example, it only shows the function option \func, and not \func{}{}{}{}.

I would like it to always display the brackets, so that I can use the convenient "tabbing-through" feature. I am still a novice when it comes to latex. Am I doing something wrong, or if this is a bug with overleaf?

1
  • 2
    Have you contacted the Overleaf Helpdesk? I hear their LaTeX support staff are top-notch.
    – Mico
    May 2 at 19:20
0

I think I may have partially answered my own question. It appears that the first time you use a new command you have to type out all the brackets. After you do that though, if you want to use it again, it will appear in the autocomplete box with all the brackets.

For example, here is the first time I type out "\testing" for the newcommand that I created.

enter image description here

And here is the second time I type out "\testing" for the new command that I created.

enter image description here

It would still be nice if it could have \testing{}{} in the autocomplete menu the first time you want to use it, instead of having to manually put the brackets the first time you use it (and also hence not be able to use the useful feature of jumping through the curly braces the first time). If anyone knows how to have that feature that would be great.

Additionally, I think it would be good if it would just get rid of the original "\testing" option in the menu, because otherwise you still have to type all the letters "\testing" for it to get rid of the first "\testing" option in the menu. If it got rid of that option, then you could just type the first few letters and it would come up with the right one, upon which you can press enter. This is just a minor problem, but I would still be curious if anyone knows how to get rid of it.

enter image description here

2
  • Regarding your "additionally", have you tried using the down arrow or clicking the desired one?
    – Teepeemm
    May 2 at 21:46
  • Well yes but that is not as quick if you can just press enter. It would interrupt my flow if I had to do that every time May 3 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.