2016-02-10 22:48:53 -05:00
# vim-autoformat
2017-01-24 10:40:40 -05:00
Format code with one button press.
This plugin makes use of external formatting programs to achieve the best results.
Check the list of formatprograms below to see which languages are supported by default.
You can easily customize these or add your own formatprogram.
2016-03-11 12:09:05 -05:00
When no formatprogram exists (or no formatprogram is installed) for a certain filetype,
vim-autoformat falls back by default to indenting, (using vim's auto indent functionality), retabbing and removing trailing whitespace.
2012-12-01 13:03:23 -05:00
2016-02-10 22:48:53 -05:00
## How to install
2016-06-03 04:18:04 -04:00
This plugin is supported by Vim 7.4+.
2015-06-11 03:51:51 -04:00
It is required that your vim has builtin python support. You can check whether this is the case
2015-06-22 03:18:49 -04:00
by running `vim --version` and check that `+python` or `+python3` is listed among features.
2015-06-11 03:51:51 -04:00
2016-02-10 22:48:53 -05:00
#### Vundle
2012-12-01 13:03:23 -05:00
Put this in your .vimrc
```vim
2014-08-26 10:58:22 -04:00
Plugin 'Chiel92/vim-autoformat'
2012-12-01 13:03:23 -05:00
```
2015-01-02 16:26:03 -05:00
Then restart vim and run `:PluginInstall` .
To update the plugin to the latest version, you can run `:PluginUpdate` .
2013-03-17 07:30:50 -04:00
2016-02-10 22:48:53 -05:00
#### Pathogen
2013-03-17 07:30:50 -04:00
Download the source and extract in your bundle directory.
Updating has to be done manually, as far as I'm aware.
2016-02-10 22:48:53 -05:00
#### Other
2013-03-17 07:30:50 -04:00
It is highly recommended to use a plugin manager such as Vundle, since this makes it easy to update plugins or uninstall them.
It also keeps your .vim directory clean.
2013-03-27 05:17:24 -04:00
Still you can decide to download this repository as a zip file or whatever and extract it to your .vim folder.
2013-03-17 07:30:50 -04:00
2016-02-10 22:48:53 -05:00
## How to use
2013-03-27 05:17:24 -04:00
First you should install an external program that can format code of the programming language you are using.
2013-04-23 10:01:16 -04:00
This can either be one of the programs that are listed below as defaultprograms, or a custom program.
2015-06-06 05:54:30 -04:00
For defaultprograms, vim-autoformat knows for which filetypes it can be used.
2013-04-23 10:01:16 -04:00
For using a custom formatprogram, read the text below *How can I change the behaviour of formatters, or add one myself?*
2015-05-31 14:58:14 -04:00
If the formatprogram you want to use is installed in one of the following ways, vim automatically detects it:
2016-02-10 22:48:53 -05:00
2013-04-23 10:01:16 -04:00
* It suffices to make the formatprogram globally available, which is the case if you install it via your package manager.
2015-05-31 15:56:00 -04:00
* Alternatively you can point vim-autoformat to folders containing formatters, by putting the absolute paths to these folders in `g:formatterpath` in your .vimrc, like:
2016-02-10 22:48:53 -05:00
2015-05-31 14:58:14 -04:00
```vim
let g:formatterpath = ['/some/path/to/a/folder', '/home/superman/formatters']
```
2013-07-19 07:38:38 -04:00
2016-03-11 12:09:05 -05:00
Remember that when no formatprograms exists for a certain filetype,
vim-autoformat falls back by default to indenting, retabbing and removing trailing whitespace.
This will fix at least the most basic things, according to vim's indentfile for that filetype.
2012-12-02 09:12:04 -05:00
2015-05-23 08:25:29 -04:00
When you have installed the formatter you need, you can format the entire buffer with the command `:Autoformat` .
2014-06-29 15:30:05 -04:00
You can provide the command with a file type such as `:Autoformat json` , otherwise the buffer's filetype will be used.
2015-05-31 15:56:00 -04:00
2015-06-06 05:54:30 -04:00
Some formatters allow you to format only a part of the file, for instance `clang-format` and
`autopep8` .
2015-05-31 14:58:14 -04:00
To use this, provide a range to the `:Autoformat` command, for instance by visually selecting a
part of your file, and then executing `:Autoformat` .
2012-12-02 09:12:04 -05:00
For convenience it is recommended that you assign a key for this, like so:
2012-12-02 15:19:14 -05:00
2012-12-02 09:12:04 -05:00
```vim
2015-05-31 14:58:14 -04:00
noremap < F3 > :Autoformat< CR >
2012-12-02 09:12:04 -05:00
```
2015-06-06 05:54:30 -04:00
Or to have your code be formatted upon saving your file, you could use something like this:
```vim
au BufWrite * :Autoformat
```
2016-03-11 12:09:05 -05:00
To disable the fallback to vim's indent file, retabbing and removing trailing whitespace, set the following variables to 0.
2016-02-10 22:48:53 -05:00
2015-12-15 07:15:05 -05:00
```vim
let g:autoformat_autoindent = 0
2016-03-11 12:09:05 -05:00
let g:autoformat_retab = 0
let g:autoformat_remove_trailing_spaces = 0
```
2016-03-30 04:01:56 -04:00
To disable or re-enable these option for specific buffers, use the buffer local variants:
`b:autoformat_autoindent` , `b:autoformat_retab` and `b:autoformat_remove_trailing_spaces` .
2016-04-06 09:55:27 -04:00
So to disable autoindent for filetypes that have incompetent indent files, use
```vim
autocmd FileType vim,tex let b:autoformat_autoindent=0
```
2016-03-11 12:09:05 -05:00
You can manually autoindent, retab or remove trailing whitespace with the following respective
commands.
```vim
gg=G
:retab
:RemoveTrailingSpaces
2015-12-15 07:15:05 -05:00
```
2015-06-06 05:54:30 -04:00
For each filetype, vim-autoformat has a list of applicable formatters.
2016-03-11 12:09:05 -05:00
If you have multiple formatters installed that are supported for some filetype, vim-autoformat
tries all formatters in this list of applicable formatters, until one succeeds.
2015-12-23 11:01:37 -05:00
You can set this list manually in your vimrc (see section *How can I change the behaviour of formatters, or add one myself?* ,
2015-12-04 03:59:23 -05:00
or change the formatter with the highest priority by the commands `:NextFormatter` and `:PreviousFormatter` .
To print the currently selected formatter use `:CurrentFormatter` .
2016-03-30 04:01:56 -04:00
These latter commands are mostly useful for debugging purposes.
2016-03-11 12:09:05 -05:00
If you have a composite filetype with dots (like `django.python` or `php.wordpress` ),
vim-autoformat first tries to detect and use formatters for the exact original filetype, and
2016-09-08 13:29:14 -04:00
then tries the same for all supertypes occurring from left to right in the original filetype
2016-03-11 12:09:05 -05:00
separated by dots (`.`).
2015-05-23 08:25:29 -04:00
2016-02-10 22:48:53 -05:00
## Default formatprograms
2013-04-20 17:46:42 -04:00
Here is a list of formatprograms that are supported by default, and thus will be detected and used by vim when they are installed properly.
2012-12-06 17:58:01 -05:00
2015-05-30 06:12:06 -04:00
* `clang-format` for __C__ , __C++__ , __Objective-C__ (supports formatting ranges).
2016-02-10 22:48:53 -05:00
Clang-format is a product of LLVM source builds.
If you `brew install llvm` , clang-format can be found in /usr/local/Cellar/llvm/bin/.
Vim-autoformat checks whether there exists a `.clang-format` or a `_clang-format` file up in
2016-09-08 13:29:14 -04:00
the current directory's ancestry. Based on that it either uses that file or tries to match
2016-02-10 22:48:53 -05:00
vim options as much as possible.
Details: http://clang.llvm.org/docs/ClangFormat.html.
2015-01-08 04:48:38 -05:00
2015-05-23 08:25:29 -04:00
* `astyle` for __C#__ , __C++__ , __C__ and __Java__ .
2016-02-10 22:48:53 -05:00
Download it here: http://astyle.sourceforge.net/.
*Important: version `2.0.5` or higher is required, since only those versions correctly support piping and are stable enough.*
2015-05-23 08:25:29 -04:00
2015-05-30 06:12:06 -04:00
* `autopep8` for __Python__ (supports formatting ranges).
2016-02-10 22:48:53 -05:00
It's probably in your distro's repository, so you can download it as a regular package.
For Ubuntu type `sudo apt-get install python-autopep8` in a terminal.
Here is the link to the repository: https://github.com/hhatto/autopep8.
And here the link to its page on the python website: http://pypi.python.org/pypi/autopep8/0.5.2.
2012-12-06 17:50:38 -05:00
2016-04-28 21:57:04 -04:00
* `yapf` for __Python__ (supports formatting ranges).
2017-01-20 09:06:49 -05:00
It is readily available through PIP. Most users can install with the terminal command `sudo pip install yapf` or `pip install --user yapf` .
2016-04-28 21:57:04 -04:00
YAPF has one optional configuration variable to control the formatter style.
For example:
```vim
let g:formatter_yapf_style = 'pep8'
```
2016-04-29 15:43:42 -04:00
`pep8` is the default value, or you can choose: `google` , `facebook` , `chromium` .
2016-04-28 21:57:04 -04:00
Here is the link to the repository: https://github.com/google/yapf
2014-06-29 15:15:10 -04:00
* `js-beautify` for __Javascript__ and __JSON__ .
2016-02-10 22:48:53 -05:00
It can be installed by running `npm install -g js-beautify` .
Note that `nodejs` is needed for this to work.
The python version version is also supported by default, which does not need `nodejs` to run.
Here is the link to the repository: https://github.com/einars/js-beautify.
2013-12-20 14:34:38 -05:00
2015-05-31 16:10:33 -04:00
* `JSCS` for __Javascript__ . http://jscs.info/
2015-03-22 15:30:10 -04:00
2016-10-30 20:12:26 -04:00
* `standard` for __Javascript__ .
It can be installed by running `npm install -g standard` (`nodejs` is required). No more configuration needed.
More information about the style guide can be found here: http://standardjs.com/.
2017-03-11 19:23:40 -05:00
* `ESlint (local)` for __Javascript__ . http://eslint.org/
It can be installed by running `npm install eslint` . The linter is then installed locally at ```node_modules/.bin/eslint```
2017-03-13 19:44:30 -04:00
When running formatter vim will walk up from the current file to search for such local installation and a
ESLint configuration file (either .eslintrc or eslintrc.json). When both are found eslint is executed with the --fix argument.
2017-03-11 19:23:40 -05:00
This linter can be disabled using global setting
```vim
let g:formatters_javascript_eslint_local = 0
```
Currently only working on *nix like OS (Linux, MacOS etc.) requires OS to provide sh like shell syntax
2017-01-12 09:31:13 -05:00
* `xo` for __Javascript__ .
It can be installed by running `npm install -g xo` (`nodejs` is required).
Here is the link to the repository: https://github.com/sindresorhus/xo.
2013-12-20 14:34:38 -05:00
* `html-beautify` for __HTML__ .
2016-02-10 22:48:53 -05:00
It is shipped with `js-beautify` , which can be installed by running `npm install -g js-beautify` .
Note that `nodejs` is needed for this to work.
Here is the link to the repository: https://github.com/einars/js-beautify.
2013-12-20 14:34:38 -05:00
2014-05-30 16:42:30 -04:00
* `css-beautify` for __CSS__ .
2016-02-10 22:48:53 -05:00
It is shipped with `js-beautify` , which can be installed by running `npm install -g js-beautify` .
Note that `nodejs` is needed for this to work.
Here is the link to the repository: https://github.com/einars/js-beautify.
2014-05-30 16:42:30 -04:00
2015-05-31 16:10:33 -04:00
* `typescript-formatter` for __Typescript__ .
2016-02-10 22:48:53 -05:00
`typescript-formatter` is a thin wrapper around the TypeScript compiler services.
It can be installed by running `npm install -g typescript-formatter` .
Note that `nodejs` is needed for this to work.
Here is the link to the repository: https://github.com/vvakame/typescript-formatter.
2015-05-31 16:10:33 -04:00
2014-09-26 14:00:08 -04:00
* `sass-convert` for __SCSS__ .
2016-02-10 22:48:53 -05:00
It is shipped with `sass` , a CSS preprocessor written in Ruby, which can be installed by running `gem install sass` .
Here is the link to the SASS homepage: http://sass-lang.com/.
2014-09-26 14:00:08 -04:00
2015-06-13 11:53:44 -04:00
* `tidy` for __HTML__ , __XHTML__ and __XML__ .
2016-02-10 22:48:53 -05:00
It's probably in your distro's repository, so you can download it as a regular package.
For Ubuntu type `sudo apt-get install tidy` in a terminal.
2013-01-20 12:56:32 -05:00
2014-12-11 02:05:48 -05:00
* `rbeautify` for __Ruby__ .
2016-02-10 22:48:53 -05:00
It is shipped with `ruby-beautify` , which can be installed by running `gem install ruby-beautify` .
Note that compatible `ruby-beautify-0.94.0` or higher version.
Here is the link to the repository: https://github.com/erniebrodeur/ruby-beautify.
This beautifier developed and tested with ruby `2.0+` , so you can have weird results with earlier ruby versions.
2014-12-11 02:05:48 -05:00
2017-01-13 11:20:06 -05:00
* `rubocop` for __Ruby__ .
It can be installed by running `gem install rubocop` .
Here is the link to the repository: https://github.com/bbatsov/rubocop
2015-06-13 05:10:25 -04:00
* `gofmt` for __Golang__ .
2016-02-10 22:48:53 -05:00
The default golang formatting program is shipped with the golang distribution. Make sure `gofmt` is in your PATH (if golang is installed properly, it should be).
Here is the link to the installation: https://golang.org/doc/install
2015-06-13 05:10:25 -04:00
2015-11-03 08:45:25 -05:00
* `rustfmt` for __Rust__ .
2016-02-10 22:48:53 -05:00
It can be installed using `cargo` , the Rust package manager. Up-to-date installation instructions are on the project page: https://github.com/nrc/rustfmt/#installation.
2015-11-03 08:45:25 -05:00
2015-11-05 09:32:43 -05:00
* `dartfmt` for __Dart__ .
2016-02-10 22:48:53 -05:00
Part of the Dart SDK (make sure it is on your PATH). See https://www.dartlang.org/tools/dartfmt/ for more info.
2015-11-05 09:32:43 -05:00
2015-11-29 23:19:22 -05:00
* `perltidy` for __Perl__ .
2016-02-10 22:48:53 -05:00
It can be installed from CPAN `cpanm Perl::Tidy` . See https://metacpan.org/pod/Perl::Tidy and http://perltidy.sourceforge.net/ for more info.
2015-11-29 23:19:22 -05:00
2015-12-05 16:10:58 -05:00
* `stylish-haskell` for __Haskell__
2016-02-10 22:48:53 -05:00
It can be installed using [`cabal` ](https://www.haskell.org/cabal/ ) build tool. Installation instructions are available at https://github.com/jaspervdj/stylish-haskell#installation
2016-03-17 23:36:32 -04:00
* `remark` for __Markdown__ .
2017-02-19 07:45:46 -05:00
A Javascript based markdown processor that can be installed with `npm install -g remark-cli` . More info is available at https://github.com/wooorm/remark.
2016-03-17 23:36:32 -04:00
2016-08-30 04:59:32 -04:00
* `fprettify` for modern __Fortran__ .
Download from [official repository ](https://github.com/pseewald/fprettify ). Install with `./setup.py install` or `./setup.py install --user` .
2017-02-02 03:48:25 -05:00
## It doesn't work!
2016-06-15 04:00:58 -04:00
If you're struggling with getting a formatter to work, it may help to set vim-autoformat in
verbose-mode. Vim-autoformat will then output errors on formatters that failed.
```vim
let g:autoformat_verbosemode=1
" OR:
let verbose=1
```
To read all messages in a vim session type `:messages` . Since one cannot always easily copy
the contents of messages (e.g. for posting it in an issue), vim-autoformats command `:PutMessages` may
help. It puts the messages in the current buffer, allowing you to do whatever you want.
2016-02-10 22:48:53 -05:00
## How can I change the behaviour of formatters, or add one myself?
2015-12-05 16:10:58 -05:00
2013-04-23 10:01:16 -04:00
If you need a formatter that is not among the defaults, or if you are not satisfied with the default formatting behaviour that is provided by vim-autoformat, you can define it yourself.
*The formatprogram must read the unformatted code from the standard input, and write the formatted code to the standard output.*
2015-05-23 08:25:29 -04:00
2015-05-31 15:56:00 -04:00
#### Basic definitions
2016-02-10 22:48:53 -05:00
2015-05-31 14:58:14 -04:00
The formatprograms that available for a certain `<filetype>` are defined in `g:formatters_<filetype>` .
2016-09-08 13:29:14 -04:00
This is a list containing string identifiers, which point to corresponding formatter definitions.
2015-05-31 14:58:14 -04:00
The formatter definitions themselves are defined in `g:formatdef_<identifier>` as a string
expression.
2013-03-16 08:53:16 -04:00
Defining any of these variable manually in your .vimrc, will override the default value, if existing.
2015-06-06 05:54:30 -04:00
For example, a complete definition in your .vimrc for C# files could look like this:
2013-03-08 15:14:17 -05:00
```vim
2015-05-23 08:25:29 -04:00
let g:formatdef_my_custom_cs = '"astyle --mode=cs --style=ansi -pcHs4"'
let g:formatters_cs = ['my_custom_cs']
2013-03-08 15:14:17 -05:00
```
2015-06-06 05:54:30 -04:00
In this example, `my_custom_cs` is the identifier for our formatter definition.
2016-03-11 12:09:05 -05:00
The first line defines how to call the external formatter, while the second line tells
vim-autoformat that this is the only formatter that we want to use for C# files.
2015-05-23 08:25:29 -04:00
*Please note the double quotes in `g:formatdef_my_custom_cs` *.
This allows you to define the arguments dynamically:
2013-03-23 05:20:33 -04:00
```vim
2015-05-23 08:25:29 -04:00
let g:formatdef_my_custom_cs = '"--mode=cs --style=ansi -pcHs".& shiftwidth'
let g:formatters_cs = ['my_custom_cs']
2013-03-23 05:20:33 -04:00
```
2015-05-31 14:58:14 -04:00
Please notice that `g:formatdef_my_custom_cs` contains an expression that can be evaluated, as required.
2013-03-16 08:53:16 -04:00
As you see, this allows us to dynamically define some parameters.
2013-03-27 05:17:24 -04:00
In this example, the indent width that astyle will use, depends on the buffer local value of `&shiftwidth` , instead of being fixed at 4.
2015-05-23 08:25:29 -04:00
So if you're editing a csharp file and change the `shiftwidth` (even at runtime), the `g:formatdef_my_custom_cs` will change correspondingly.
2013-03-17 07:30:50 -04:00
2013-03-26 18:03:15 -04:00
For the default formatprogram definitions, the options `expandtab` , `shiftwidth` and `textwidth` are taken into account whenever possible.
2013-03-17 07:30:50 -04:00
This means that the formatting style will match your current vim settings as much as possible.
2015-06-06 05:54:30 -04:00
You can have look look at the exact default definitions for more examples.
They are defined in `vim-autoformat/plugin/defaults.vim` .
2015-10-08 12:15:41 -04:00
As a small side note, in the actual defaults the function `shiftwidth()` is used instead of the
property. This is because it falls back to the value of `tabstop` if `shiftwidth` is 0.
2013-03-08 15:14:17 -05:00
2016-03-11 12:09:05 -05:00
If you have a composite filetype with dots (like `django.python` or `php.wordpress` ),
vim-autoformat internally replaces the dots with underscores so you can specify formatters
through `g:formatters_django_python` and so on.
2015-01-12 08:17:27 -05:00
2016-09-08 13:29:14 -04:00
To override these options for a local buffer, use the buffer local variants:
`b:formatters_<filetype>` and `b:formatdef_<identifier>` . This can be useful, for example, when
working with different projects with conflicting formatting rules, with each project having settings
in its own vimrc or exrc file:
```vim
let b:formatdef_custom_c='"astyle --mode=c --suffix=none --options=/home/user/special_project/astylerc"'
let b:formatters_c = ['custom_c']
```
2015-05-31 15:56:00 -04:00
#### Ranged definitions
2016-02-10 22:48:53 -05:00
2015-05-31 14:58:14 -04:00
If your format program supports formatting specific ranges, you can provide a format
2015-05-30 05:12:02 -04:00
definition which allows to make use of this.
2015-05-30 06:12:06 -04:00
The first and last line of the current range can be retrieved by the variables `a:firstline` and
2015-05-30 05:12:02 -04:00
`a:lastline` . They default to the first and last line of your file, if no range was explicitly
specified.
So, a ranged definition could look like this.
2016-02-10 22:48:53 -05:00
2015-05-30 05:12:02 -04:00
```vim
let g:formatdef_autopep8 = "'autopep8 - --range '.a:firstline.' '.a:lastline"
let g:formatters_python = ['autopep8']
```
2016-02-10 22:48:53 -05:00
2015-05-31 14:58:14 -04:00
This would allow the user to select a part of the file and execute `:Autoformat` , which
2015-05-30 06:12:06 -04:00
would then only format the selected part.
2015-05-30 05:12:02 -04:00
2012-12-03 15:37:30 -05:00
2016-02-10 22:48:53 -05:00
## Contributing
2013-12-20 14:34:38 -05:00
Pull requests are welcome.
2013-03-27 05:17:24 -04:00
Any feedback is welcome.
2016-03-11 12:09:05 -05:00
If you have any suggestions on this plugin or on this readme, if you have some nice default
formatter definition that can be added to the defaults, or if you experience problems, please
contact me by creating an issue in this repository.
2013-03-09 06:10:10 -05:00
2016-02-10 22:48:53 -05:00
## Change log
2017-01-12 09:31:13 -05:00
### January 2017
* Add `xo` formatter for JavaScript.
2016-03-11 12:09:05 -05:00
### March 2016
2016-12-03 15:32:50 -05:00
* Don't use the option formatprg internally anymore, to always have the possible of using the default `gq`
2016-03-11 12:09:05 -05:00
command.
2016-12-03 15:32:50 -05:00
* Add more fallback options.
2016-03-11 12:09:05 -05:00
2015-05-31 16:10:33 -04:00
### June 2015
2016-02-10 22:48:53 -05:00
2015-05-31 16:10:33 -04:00
* *Backward incompatible patch!*
2015-11-12 05:30:59 -05:00
* Multiple formatters per filetype are now supported.
* Configuration variable names changed.
2016-03-10 11:18:15 -05:00
* Using `gq` as alias for `:Autoformat` is no longer supported.
2015-11-12 05:30:59 -05:00
* `:Autoformat` now suppports ranges.
* Composite filetypes are fully supported.
2014-05-30 16:42:30 -04:00
2013-12-20 14:34:38 -05:00
### December 20 2013
2016-02-10 22:48:53 -05:00
2013-12-20 14:34:38 -05:00
* `html-beautify` is now the default for HTML since it seems to be better maintained, and seems to handle inline javascript neatly.
* The `formatters/` folder is no longer supported anymore, because it is unnecessary.
* `js-beautify` can no longer be installed as a bundle, since it only makes this plugin unnecessarily complex.
2013-03-10 15:17:54 -04:00
2013-12-20 14:34:38 -05:00
### March 27 2013
2016-02-10 22:48:53 -05:00
2013-12-20 14:34:38 -05:00
* The default behaviour of gq is enabled again by removing the fallback on auto-indenting.
2016-02-10 22:48:53 -05:00
Instead, the fallback is only used when running the command `:Autoformat` .
2013-12-20 14:34:38 -05:00
* For HTML,XML and XHTML, the option `textwidth` is taken into account when formatting.
2016-02-10 22:48:53 -05:00
This extends the way the formatting style will match your current vim settings.
2013-03-16 08:57:11 -04:00
2013-03-16 07:21:55 -04:00
### March 16 2013
2016-02-10 22:48:53 -05:00
2013-03-16 08:57:11 -04:00
The `dynamic_indent_width` branch has been merged into the master branch.
2016-02-10 22:48:53 -05:00
2013-03-16 08:53:16 -04:00
* The options `expandtab` , `shiftwidth` , `tabstop` and `softtabstop` are not overwritten anymore.
* This obsoletes `g:autoformat_no_default_shiftwidth`
2013-03-16 08:57:11 -04:00
* `g:formatprg_args_expr_<filetype>` is introduced.
2013-03-27 05:17:24 -04:00
2013-12-20 14:34:38 -05:00
### March 13 2013
2016-02-10 22:48:53 -05:00
2013-12-20 14:34:38 -05:00
* It is now possible to prevent vim-autoformat from overwriting your settings for `tabstop` , `softtabstop` , `shiftwidth` and `expandtab` in your .vimrc.
### March 10 2013
2016-02-10 22:48:53 -05:00
2013-12-20 14:34:38 -05:00
* When no formatter is installed or defined, vim will now auto-indent the file instead. This uses the indentfile for that specific filetype.
### March 9 2013
2016-02-10 22:48:53 -05:00
2013-12-20 14:34:38 -05:00
The `custom_config` branch has been merged into the master branch.
2016-02-10 22:48:53 -05:00
2015-11-12 05:30:59 -05:00
* Customization of formatprograms can be done easily now, as explained in the readme.
2013-12-20 14:34:38 -05:00
* I set the default tabwidth to 4 for all formatprograms as well as for vim itself.
* The default parameters for astyle have been slightly modified: it will wrap spaces around operators.
* phpCB has been removed from the defaults, due to code-breaking behaviour.
* XHTML default definition added