auctex.vim


Ⅰ. 插件描述

macros for latex

Ⅱ. 基本信息

创建日期:  2001-12-03
使用用户:  6
Github星:  11
插件作者:  Carl Mueller

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/auctex-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/auctex-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/auctex-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/auctex.vim

Ⅳ. 文档说明

This is a large collection of Latex macros, with inspiration
from the emacs package "auctex", among other places.  
Read the file for details;  I have written many comments.

You should freely modify these macros.  Most of them are  
indepent, so nothing will break.  In some places I've provided
alternate versions which are commented out.  If you have good
ideas, contact me and I'll incorporate them.

By popular demand, here is a more extensive description of
the key bindings:
http://www.math.rochester.edu/people/faculty/cmlr/Latex/auctex-vim-keybindings

There is also Vim-LaTeX,
http://vim-latex.sourceforge.net
It is a more extensive package, developed by a group, and I have
contributed most of my ideas to this project.  You might prefer
my script if you like something smaller, with parts that are (mostly)
independent and easy to modify.

Briefly,

In normal mode, F1 - F4 will insert latex templates, unless they are
already there in the file.  You have to provide these templates yourself.

In insert mode, F1 - F5 will insert environments such as begin{..} end{..}.

C-S-F1 through C-S-F5 will alter existing environments.

(), $$, [], [], {}, {}, && are inserted in matching pairs.

Outside of a math environment, tab does word completion,
or gives a tab if the previous character is a space or
a line beginning.  Within a math environment,
tab moves you between parentheses or to the end of the
environment.

Many Latex commands are bound to the ` key.  (This comes from auctex).
For instance, alpha is bound to a, and \infty is bound to 8.
frac{}{} is bound to `/  .

Menu items allow you to change or delete matching pairs of brackets,
as well as insert left..right automatically.  

Now pressing <Insert> twice will also allow modification of brackets, according
to a menu that appears at the bottom.

In normal mode, K runs latex, takes you to the position of the first error (if any),
and displays the error message with highlighting.

To get mathbf{R}, type r<Insert>b.  To get mathcal{R}, type r<Insert>c.
<Insert>s produces sqrt{}.  Capital letters are more common, but you can
still get mathbf{x} by typing X<Insert>b.  Same for mathcal.

Some macros are polymorphic.  For instance, when preceded by bracket,
<Insert>l will insert left..right around the brackets.  Otherwise it
will insert label{} and position the cursor in between the {}.
Likewise, <Insert>c will produce cite{} when preceded by a blank or at
the beginning of the line;  but, for example, b<Insert>b will produce mathbf{B}.

There are "smart quotes".  That is, typing " will produce a `` if there is
a space before the ", and will produce '' otherwise.

You can embrace the visual region with () by typing `(.  This works
for other kinds of parentheses, too, as well as $$ and &&.

Long lines are automatically split up to keep $..$ (math expressions)
on the same line.

There are several abbreviations, such as b for bigskip.

You can add your own macros, the macro key is ;

Inspired by LaTeX-Suite, the tab key has some new uses.  Inside ref{}, it opens
a subwindow with the reference keys.  Pressing enter will insert that reference.  
Ditto for cite{}, the subwindow will show either your bibitem entries (if any) or
your bibtex file.  Pressing enter within the bibtex reference will insert the proper
citation key.

添加新评论