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?

Håkon Hægland
  • 3,608
  • 1
  • 20
  • 51
  • See also [How to scroll through all available matching interactive commands using Helm](http://emacs.stackexchange.com/questions/17/how-to-scroll-through-all-available-matching-interactive-m-x-commands-using-he) – Håkon Hægland Sep 02 '16 at 08:03

1 Answers1

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.
xuchunyang
  • 14,302
  • 1
  • 18
  • 39