There are no reviews yet. Be the first to send feedback to the community and the maintainers!
This is a mirror of http://www.vim.org/scripts/script.php?script_id=294 [ALIGN/ALIGNMAPS NEEDS VIM 7.0 AS OF V29/34] Align and AlignMaps lets you align statements on their equal signs, make comment boxes, align comments, align declarations, etc. Note: this plugin is not a left&right margin justification tool! See vimscript#177, vimscript#2324, or vimscript#3728 for that. Note: if you have vim 7.1 or later, your vimball should unpack just fine without having to update it. There are two basic commands provided by this package: AlignCtrl options sep1 sep2 sep3 ... [range]Align sep1 sep2 sep3 ... The "sep#" are regular expressions which describe separators that delineate fields; Align will line up the separators. The range may be any Vim range, _including_ visual-blocks. Align works on lines of the form: (ws==whitespace, sep==separator, field==text) ws-field-ws-sep-ws-field-ws-sep-ws-field-... ws-field-ws-sep-ws-field-ws-sep-ws-field-... Note that white-space (ws) surrounding separators is ignored. The Align package includes: Align : the basic alignment command AlignCtrl : provides options for the next call to :Align AlignMaps : many three or four key maps which support aligning C/C++ style declarations, ()?..:.., expressions, C/C++ comments, numbers, C preprocessor definitions, tables based on tabs or spaces, and more. In addition, AutoAlign (vimscript#884) uses the Align function to align =s as you type. Align handles alignment on multiple separators, not just the first one, and the separators may be the same across the line or different. With AlignCtrl one may specify that separators are cyclic (re-used sequentially) or equivalent (all separators are simultaneously active). There are several options to help with deciding what to do with initial white space. By default Align re-uses the first line's initial white space, but one may use AlignCtrl to retain or remove each line's initial white space. The <Align.vim> and <AlignMaps.vim> files are plugins and require vim 6.1 or higher. EXAMPLES: :5,10Align = Align on '=' signs :'<,'>Align = + - \* / Align on any of the five separator characters shown. Note that visual block mode was used to fire off Align. :AlignCtrl =lp1P1I which means: = all separators are equivalent l fields will be left-justified p1 pad one space before each separator P1 pad one space after each separator I preserve and apply the first line's leading white space to all Align'd lines :help align Gives help for Align ALIGNMENT CONTROL Alignment control allows for left or right justification or centering of fields, cyclic (sequentially active) or equivalent (simultaneously active) regular expressions to specify field separators, initial white space control, optional visual-block use (ie. apply Alignment only within a block), user-specified white-space padding about separators, and multiple separators. MANY ALIGNMENT MAPS AlignMaps.vim provides a number of maps which make using this package easy. They typically either apply to the range 'a,. (from mark a to current line) or use the visual-selection (V, v, or ctrl-v selected): \t= : align assignments (don't count logic, like == or !=) \t, : align on commas \t| : align on vertical bars (|) \tsp : align on whitespace \tt : align LaTeX tabular tables AlignMaps also provides some internally complex maps for aligning C declarations, Ansi C function arguments, html tables, LaTeX tabulars, and trailing comments: \acom : align comments \adec : align C declarations (one variable per line) \afnc : align ansi-style C function input arguments \Htd : align html tables To see some examples of this, check out http://www.drchip.org/astronaut/vim/align.html#Examples (the proportional fonts used by most browsers in showing you this page preclude showing the examples here). The help for Align and AlignCtrl also contains many examples. (for those of you who prefer not to have the maps that AlignMaps.vim provides, simply remove the AlignMapsPlugin.vim from .vim/plugin and AlignMaps.vim from .vim/autoload - that's why AlignMaps is separate from Align) ALIGNMENT ON VISUAL BLOCKS AND g,v-LIKE CONTROL Sometimes one wants to align only a subset of text in a range, based on patterns or column extents. Align supports both types of restrictions! Visual-block selection may be used to restrict Align to operate only within that visual block. AlignCtrl supports "g" and "v" patterns that restrict Align to operate on lines which match (or don't match, respectively) those patterns. NEW STUFF: There's a number of new AlignCtrl options: - allows one to skip a separator (treat it as part of a field) + repeat the last lrc justification (ex. lr+ == lrrrrrr... ) : treat the rest of the line as a field; acts as a modifier to the last lrc. < left-justify the separator > right-justify the separator | center the separator These are, except for the ":", cyclic parameters. In other words, >< is equivalent to ><><><><... . Thus separators can be of differing lengths (ex. -\+ as a separator pattern can match -, --, ---, etc and the separators will be left/right/center justified as you wish). To get automatic, as-you-type, aligning of = in the C, vimL, and other languages, check out vimscript#884 for several ftplugins (which use Align). Alternative Aligners: Gergely Kontra's vimscript#176 Thank you for rating Align! --------------------------------------- DISCUSSION and COMMENTS: --------------------------------------- Please use email for bugs. Enjoy! (alpha/beta version available at http://mysite.verizon.net/astronaut/vim/index.html#ALIGN)
taglist.vim
Source code browser (supports C/C++, java, perl, python, tcl, sql, php, etc)dbext.vim
Provides database access to many dbms (Oracle, Sybase, Microsoft, MySQL, DBI,..)YankRing.vim
Maintains a history of previous yanks, changes and deletesa.vim
Alternate Files quickly (.c --> .h etc)DrawIt
Ascii drawing plugin: lines, ellipses, arrows, fills, and more!ReplaceWithRegister
Replace text with the contents of a register.Conque-GDB
GDB command line interface and terminal emulator in (G)Vim.AutoComplPop
Automatically opens popup menu for completionsFuzzyFinder
buffer/file/command/tag/etc explorer with fuzzy matchingConque-Shell
Run interactive commands inside a Vim buffervim-auto-save
Automatically save changes to diskvimwiki
Personal Wiki for VimZoomWin
Zoom in/out of windows (toggle between one window and multi-window)VimClojure
A filetype, syntax and indent plugin for Clojureparedit.vim
Paredit Mode: Structured Editing of Lisp S-expressionsDoxygenToolkit.vim
Simplify Doxygen documentation in C, C++, Python.c.vim
C/C++ IDE -- Write and run programs. Insert statements, idioms, comments etc.mru.vim
Plugin to manage Most Recently Used (MRU) filesmatchit.zip
extended % matching for HTML, LaTeX, and many other languagesargtextobj.vim
Text-object like motion for argumentsUltiSnips
The ultimate snippet solution for python enabled Vim.Vim-R-plugin
Plugin to work with Rslimv.vim
SLIME-like Lisp and Clojure REPL inside Vim with Profiling, Hyperspec, Pareditbufexplorer.zip
Buffer Explorer / BrowserTaskList.vim
Eclipse like task listVimIM
Vim Input Method -- Vim ä¸æ–‡è¾“入法VOoM
Vim Outliner of Markers -- two-pane outliner and related utilitiesSQLUtilities
SQL utilities - Formatting, generate - columns lists, procedures for databasesbash-support.vim
BASH IDE -- Write and run BASH-scripts using menus and hotkeys.netrw.vim
Network oriented reading, writing, and browsing (keywords: netrw ftp scp)OmniCppComplete
C/C++ omni-completion with ctags databaseLanguageTool
Grammar checker for English, French, German (etc.) in VimPydiction
Tab-complete your Python codeTwitVim
Twitter client for Vimxoria256.vim
Finely tuned soft gamma, 256 colors, dark background, gvim == vimindentpython.vim
An alternative indentation script for pythonutl.vim
Univeral Text Linking - Execute URLs, footnotes, open emails, organize ideasfcitx.vim
keep and restore fcitx state when leaving/re-entering insert modepeaksea
Refined color, contains both gui and cterm256 for dark and light backgroundSyntaxRange
Define a different filetype syntax on regions of a buffer.L9
Vim-script libraryAnsiEsc.vim
ansi escape sequences concealed, but highlighted as specified (conceal)LargeFile
Edit large files quickly (keywords: large huge speed)JavaScript-Indent
Javascript indenter (HTML indent is included)tComment
An extensible & universal comment plugin that also handles embedded filetypesThe-NERD-tree
A tree explorer plugin for navigating the filesystemnginx.vim
initial versioncamelcasemotion
Motion through CamelCaseWords and underscore_notation.ShowMarks
Visually shows the location of marks.closetag.vim
Functions and mappings to close open HTML/XML tagsBufOnly.vim
Delete all the buffers except the current/named bufferbufkill.vim
Unload/delete/wipe a buffer, keep its window(s), display last accessed buffer(s)vcscommand.vim
CVS/SVN/SVK/git/hg/bzr integration pluginAuto-Pairs
Insert or delete brackets, parens, quotes in pair.AutoClose
Inserts matching bracket, paren, brace or quoteGundo
Visualize your undo tree.grep.vim
Grep search tools integration with Vimjavacomplete
Omni Completion for JAVASearchComplete
Tab completion of words inside of a search ('/')VisIncr
Produce increasing/decreasing columns of numbers, dates, or daynamesEasyGrep
Fast and Easy Find and Replace Across Multiple Filespep8
Check your python source files with PEP8wombat256.vim
Wombat for 256 color xtermssessionman.vim
Vim session managercscope.vim
create cscope database and connect to existing proper database automatically.restore_view.vim
A plugin for automatically restoring file's cursor position and foldingMark--Karkat
Highlight several words in different colors simultaneously. (#1238 continued)loremipsum
A dummy text generatorScrollColors
Colorsheme Scroller, Chooser, and Browsergtags.vim
Integrates GNU GLOBAL source code tag system with VIM.perl-support.vim
Perl IDE -- Write and run Perl-scripts using menus and hotkeys.google.vim
Indent file for Google C++ Coding Stylewinmanager
A windows style IDE for Vim 6.0gitignore
Set 'wildignore' from ./.gitignoresudo.vim
Allows one to edit a file with prevledges from an unprivledged session.HTML-AutoCloseTag
Automatically closes HTML tags once you finish typing them.greplace.vim
Replace a pattern across multiple files interactivelyCSApprox
Make gvim-only colorschemes work transparently in terminal vimphpfolding.vim
Automatic folding of PHP functions, classes,.. (also folds related PhpDoc)SyntaxComplete
OMNI Completion based on the current syntax highlightsvis
Extended Visual Mode Commands, Substitutes, and SearchessnipMate
TextMate-style snippets for Vimworkflowish
ToDo manager plugin inspired by workflowy.comVimRepress
Plugin for managing wordpress blog from Vim.Lucius
Dark and light color scheme (GUI and 256 color terminal)SQLComplete.vim
SQLComplete is a SQL code completion system using the omnifunc frameworkWombat
Dark gray color scheme sharing some similarities with DesertDirDiff.vim
A plugin to diff and merge two directories recursively.AutoTag
Updates entries in a tags file automatically when savingTagHighlight
Extra highlighting of typedefs, enumerations etc (based on ctags)Gist.vim
vimscript for gistjsbeautify
a javascript source code formatterThe-NERD-Commenter
A plugin that allows for easy commenting of code for many filetypes.marvim
Macro Persistent Storage and Shareable Repository for VIMPython-mode-klen
python modescratch.vim
Plugin to create and use a scratch Vim bufferEmmet.vim
vim plugins for HTML and CSS hi-speed coding.IndexedSearch
shows 'Nth match out of M' at every search (index of match+total # matches)errormarker.vim
Highlights and sets error markers for lines with compile errorsTeTrIs.vim
A tetris game in pure vimLove Open Source and this site? Check out how you can help us