sponsor Vim development Vim logo Vim Book Ad

ab-prefix : Conditionally expand abbreviations on a matching prefix.

 script karma  Rating 9/3, Downloaded by 773  Comments, bugs, improvements  Vim wiki

created by
gi1242 gi1242
 
script type
ftplugin
 
description
# vim-ab-prefix

This plugin provides the ability to define abbreviations that expand only if a particular prefix is matched.

The main reason for writing this plugin was to make typing text into TeX easier. Many default abbreviations for TeX are provided.

## Example.

Typing

    By Fourier inversion (th~Finv}),
    $$
        \vp(x) = \int_R2 e^{-2\pi i x \cdot \xi} \hat \vp(\xi) dxi.
    $$

produces

    By Fourier inversion (theorem~\ref{thmFinv}),
    \begin{equation*}
        \varphi(x) = \int_{\R^2} e^{-2\pi i x \cdot \xi} \hat \vp(\xi) \, d\xi.
    \end{equation*}

If you also have the [tex_autoclose](http://www.vim.org/scripts/script.php?script_id=920) plugin installed, then you can type `\en` to close any open environment.

## Links.

* [Github page](https://github.com/gi1242/vim-ab-prefix)
 
install details
Put the contents of plugin/ in your ~/.vim/plugin directory, the contents of doc/ in your ~/.vim/doc directory.

If you also want the many pre-defined TeX abbreviations, then put the contents of ftplugin/ in your ~/.vim/ftplugin directory.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
ab-prefix.xz 1.0 2014-11-05 7.3 gi1242 gi1242 Initial upload
ip used for rating: 18.97.9.175

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github