A simple VIM plugin to help you pretty print your data.
Vim script
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
autoload/neat
doc
plugin
.hgignore
.hgtags
COPYING
README.mkd

README.mkd

neat.vim

A simple VIM plugin to help you pretty print your data.

Demo screencast

Usage

Just call :Neat to make your current buffer neater. Ranges work as well.

Want to invoke the neatness function of another filetype? Use :Neat <ft>.

Extending neat.vim

To create neatness for your filetypes, add an autoloadable file neat/<ft>.vim and define a global variable with the name g:neat#<ft>#commands in there. This variable has to be a list of command strings to be executed on a temporary buffer provided by neat.vim.

Example

To create a simple definition for files of type xml, create autoload/neat/xml.vim with the following contents:

let neat#xml#commands = [ '%s/></>\r</ge', '%normal ==' ]