AutoAlign : Automatically align as you type (autoalign): bib c c++ html maple matlab tex vim
| script karma
Downloaded by 5317
Comments, bugs, improvements
script versions (upload new version)
|[AutoAlign V12 AND LATER REQUIRES VIMBALL V18 OR LATER TO UNPACK]
[AutoAlign also requires vimscript#294]
Note: this plugin is not a right-margin justification tool; see vimscript#177 for that
AutoAlign is currently composed of one regular plugin and six ftplugins. As you type statements such as (for vim)
let xyz= 1
let x= 2
the ftplugin/vim/AutoAlign script will call upon the Align command to line up those equal signs, resulting in aligned equal signs (which can't be usefully shown here due to browsers' use of proportional fonts).
Similarly the c ftplugin will do so for
(it only applies to what you're currently typing, it doesn't take any previously existing lines into account). For c++,
= signs, <<, and >> operators get aligned. For maple, :=.
Former Version Notes:
5: AutoAlign maps and functions changed to allow use of "." to repeat entry of =... expressions. Uses g:mapleader instead of a built-in backslash to access AlignMaps. First release of AutoAlign using vim's user-help.
4: Now supports: bib c cpp tex vim. AutoAlign now breaks the undo sequence at every align operation, so one undo undoes the entire AutoAlign. Bugfix: (with virtual edit) has been fixed (when backspacing over ==). Bugfix: unwanted beeping due to virtual edit being off fixed
3: Now supported: bib c tex vim. :AA toggles AutoAlign on and off. AutoAlign now auto-aligns only blocks of alignable text. cecutil.vim included (SaveMark, SaveWinPosn, etc)
(alpha/beta version available at http://www.drchip.org/astronaut/vim/index.html#AUTOALIGN)
|1. Get vimball v18 or later (vimscript#1502) if you haven't done so already. Be sure to remove all vestiges of any older vimball versions, too. (if you have vim 7.1a or later, you probably can skip this step)
2. vim AutoAlign.vba.gz
3. AutoAlign uses vimscript#294 (Align, AlignMaps); you'll also need that if you haven't gotten it yet.
Click on the package to download.
ip used for rating: 126.96.36.199
||AutoAlign leaves "." alone when it starts; thus, one can now insert "= 0", for example, and re-apply it with vim's "." operator. Tnx to Antony Scriven!
Some bug fixes for C++'s > and < auto-aligning.
AutoAlign now passes the pluginkiller test. (vimscript#1489)
||Fixed a bug with ftplugin/bib/AutoAlign.vim (ie. for LaTeX *.bib files)
||I inadvertently left debugging on in AutoAlign v10; this one has debugging de-activated.
Plus some bugfixes.
||Works with ve= and ve=all. Uses startinsert or startinsert!, depending on whether the cursor in inside the line or being used to append.
||AutoAlign now supports html
AutoAlign now has b:autoalign_suspend# for suspend-alignment patterns
An undefined b:autoalign_reqdpat# no longer causes an error
||AutoAlign is now split into a plugin containing the majority of vimscript; the supported ftplugins contain the invoking imaps and pattern definitions that the plugin uses. Matlab support added. Should be easy to add more languages should anyone wish to contribute the needed patterns! Currently supported: bib c cpp maple matlab tex vim