vim-scripts / auctex.vim Goto Github PK
View Code? Open in Web Editor NEWmacros for latex
Home Page: http://www.vim.org/scripts/script.php?script_id=162
macros for latex
Home Page: http://www.vim.org/scripts/script.php?script_id=162
This is a mirror of http://www.vim.org/scripts/script.php?script_id=162 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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.