# Is there any LaTeX editor allowing you to tab through curly braces?

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?

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 :-)

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.

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

    \frac{${1:num}}{${2:den}}\$0


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.

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.

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.

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).