1

I am new to helm-mode. When I use it with LaTeX-mode for editing TeX files, and type backslash I get the following helm buffer:

enter image description here

Now, I would like to insert the \num command (from the siunitx package). However, the command num is not recognized, so nonumber is selected by default each time, and I then need to press arrow-up to select it and then press enter.

Is there a way to make num become the default cadidate? (Assuming I type num much more often than nonumber)

Alternatively, is there a way to make TeX-insert-macro History (see above screen shot) the default helm source instead of the current TeX-insert-macro?

1

Is there a way to make num become the default cadidate? (Assuming I type num much more often than nonumber)

You need to teach Tex-insert-macro to know num, i.e., add it to the completion collection, it looks like the completion collection is generated by (TeX-symbol-list-filtered). I don't know how since I don't use Tex at all. But it is not related to helm anyway.

Alternatively, is there a way to make TeX-insert-macro History (see above screen shot) the default helm source instead of the current TeX-insert-macro?

Yes, by setting helm-mode-reverse-history to nil, the following is its docstring.

helm-mode-reverse-history is a variable defined in `helm-mode.el'.
Its value is t

Documentation:
Display history source after current source in `helm-mode' handled commands.

You can customize this variable.

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.