I tried several LaTeX editors with auto-completion functionality, but none of them make life easier. The problem is when they auto-complete a command, such as \frac, they usually add {} automatically and you have to use the arrow keys to navigate out of the braces. But arrow keys are far away from the center of keyboard and pressing them really slows down my editing process. Is there any LaTeX editor that allows you to use Tab key to jump from braces?

  • 5
    Based on the “But arrow keys are far away from the center of keyboard”, I’d suggest checking out Vim. Although it should be mentioned that it has a rather steep learning curve.
    – morbusg
    Commented Mar 21, 2012 at 8:55
  • 7
    vim is the only way to go.
    – romeovs
    Commented Mar 21, 2012 at 10:21
  • 11
    Emacs is the one and only way to go ;-).
    – mhp
    Commented Mar 21, 2012 at 11:11
  • 2
    Oh, speaking of learning curves (I'm glad Emacs got mentioned): bit.ly/zECzq
    – morbusg
    Commented Mar 21, 2012 at 16:39

9 Answers 9


In TeXstudio (formerly called TexmakerX) you can easily do that as it allows you to define custom keyboard shortcuts.

Under "Options" -> "Configure TeXstudio..." -> "Shortcuts" -> "Editor" -> "Basic Key Mapping", you can redefine the shortcuts for the commands "Next placeholder" and "Previous placeholder" or "Next placeholder or one word right" and "Previous placeholder or one word left".

It's a workaround and it allows you to jump from the one bracket to the other quickly. You can also try to redefine shortcuts for "Move cursor right/left" (which are mapped to the arrow keys originally) or "Move cursor right/left (1 word)" commands , as long as you can get used to it :-)

  • I changed the Basic Key Mapping "Next placeholder or one word right" to Tab. Now I can use Tab to jump to next placeholder and get out of the braces. Exactly what I need!
    – Siyuan Ren
    Commented Aug 12, 2012 at 4:03

In Emacs, an experienced user (i.e. a user considering arrow keys and the like a no-no) would use a combination of C-f (forward-char), C-b (backward-char), C-M-f (forward-sexp) and C-M-b (backward-sexp) for this purpose.

If you are ambitious enough to internalize these commands you will get really fast.

PS: C denotes the Control key and M (normally) the Alt key.

In fact, the popular snippet manager yasnippet behaves as you describe by default.

  • 5
    with emacs, your fingers never need to leave the "home keys". thus, a perfect tool for someone who can touch type but suffers pain whn using a mouse. yes, a high learning curve, but with a big payoff. Commented Mar 21, 2012 at 13:17

You need to have an editor with scripting facilities : for example on OS X with Textmate, I created a snippet for frac like this


and with TAB I go from the first braces (inside) to the second braces (inside) and then to outside. I know that some editors now use snippet like Textmate.

  • VIM supports the TextMate snippet syntax vie the snipMate plugin.
    – Daniel
    Commented Dec 18, 2013 at 9:36

AFAIK, TeXworks has a similar functionality. And Emacs being a programmable editor, it is certainly possible to do it in it.

In fact, you could use yasnippet instead of C-c m, which could be both faster and have the functionality you describe. You can configure it easily to be able to type, e.g., f r <tab> and have it expanded to \frac, with <tab> (or some other key, don't remember now) move the point (cursor) to the desired locations.

  • This is what I use.
    – mrf
    Commented Jun 28, 2012 at 21:06

Texmaker uses place holders if you're using the auto-complete function, for which you use Shift+Tab, see section 4.12 in the manual.

TeXworks also uses place holders when auto-completing, and you use Ctrl+Tab to reach them, see section 4.6 in the manual.

  • I know the placeholder. But the placeholders are in the braces; It looks like this in TeXMaker: \frac{•}{•}. So after I type the content in the second braces, I still have to use arrow keys to move past the '}'.
    – Siyuan Ren
    Commented Mar 21, 2012 at 9:10
  • TeXworks has advanced scripting languages, so maybe you can write a module with the functionality, or convince some other to do that. You can also contact the authors of TeXmaker or TeXworks and persuade them to add the capability you desire.
    – Sveinung
    Commented Mar 21, 2012 at 9:36

The Vim-LaTeX package gives GVim this feature, e.g. pressing / generates \frac{<++>}{<++>}<++> and then Ctrl+J jumps to the next placeholder. You still have to reach for the Ctrl key, but this is the cleanest such feature I've been able to find.

I'm looking to introduce my younger brother to TeX with something less idiosyncratic than Vim (even though one could use Cream for more simplicity) - and it looks like I will end up using TexMaker. I like the fact that it is cross-platform, and at least you can move from brace-set to brace-set easily, even if you do have to resort to an arrow key to leave.


In kile, autocompletion inserts an "×" in all except the first argument (e.g. \frac{}{×}); you can jump to the next × using Edit->Bullets->Next bullet.

For me, the keyboard short-cut for that (ctrl-alt-rightarrow) did not work (since the window manager uses it for something else), but you can easily redefine the short-cut by right-clicking on the menu entry "Next bullet".


Winedt is highly programmable too. As a default Ctrl+Space jumps to the next (a sort of bullet). This is used e.g. for environments with arguments. It wouldn't be very difficult to change to auto-complete commands so that they add such a bullet after the last brace/the end of an environment to which you could jump.

I personly dont 't need this. I'm used to the arrows.

Btw: Winedt 7 has just been released. It can now handle unicode.


I mapped my arrow keys to Alt+WASD globally with AHK. I presume you could do something similar under *nix. Nice thing is, it works everywhere (text fields on stack exchange, for instance).

  • Welcome to TeX.SX. By AHK, do you mean AutoHotKey? Commented Dec 18, 2013 at 8:55
  • Yep. It's a pretty good solution, aside from occasional lag.
    – Mark
    Commented Dec 18, 2013 at 8:57
  • Which editor are you using? Commented Dec 18, 2013 at 9:05
  • Texmaker, but the script works in any application, be it a word processor, browser, command line, another IDE, etc.
    – Mark
    Commented Dec 18, 2013 at 9:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .