3.2 Command Mappings

3.2.1 Inserting LaTeX commands
3.2.2 Enclosing in a command
3.2.3 Changing commands
Latex-Suite provides a rich set of mappings to insert, enclose and modify LaTeX commands.

3.2.1 Inserting LaTeX commands

Pressing <F7> in insert or normal mode while the cursor is touching a word will insert a command formed from the word touching the cursor.

For certain common commands, Latex-Suite will expand them to include additional arguments as needed. For example, frac becomes \frac{<++>}{<++>}<++>. Otherwise, it will simply change the word under the cursor as follows

word --> \word{<++>}<++>

You can define custom expansions of commands using the Tex_Com_{name} setting as described in here.

If <F7> is pressed when the cursor is on white-space, then Latex-Suite will prompt you to choose a command and insert that instead.The list of commands is constructed from the g:Tex_PromptedCommands setting and also from commands which Latex-Suite finds while scanning custom packages which Latex-Suite finds. See the Package actions section for details on which files are scanned etc.

3.2.2 Enclosing in a command

You can select a portion of text visually and press <F7> while still in visual mode. This will prompt you with a list of commands. (This list can be customized via the g:Tex_PromptedCommands setting). You can either choose from this list or type in a new command name. Once the selection is done, Latex-Suite encloses the visually selected portion in the chosen command.

3.2.3 Changing commands

In both insert and normal mode <S-F7> will find out if you are presently within an environment and then prompt you with a list of commands to change it to.