Update README.markdown
This commit is contained in:
parent
72c2d4406f
commit
f115b22ec8
@ -13,7 +13,7 @@ Bundle "Chiel92/vim-autoformat"
|
||||
|
||||
How to use
|
||||
----------
|
||||
To be able to use automatic code formatting, you have to install an external program that can format code of the programming language you are using.
|
||||
First you have to install an external program that can format code of the programming language you are using.
|
||||
It suffices to make the formatprogram either globally available or to put it in the `formatters/` folder.
|
||||
Sometimes alternative installation methods are supported.
|
||||
|
||||
@ -24,27 +24,29 @@ For convenience it is recommended that you assign a key for this, like so:
|
||||
noremap <F7> :Autoformat<CR><CR>
|
||||
```
|
||||
|
||||
If you don't want to format the whole buffer, you can alternatively format visually selected code with `gq`.
|
||||
If you don't want to format the whole vimbuffer, you can alternatively format visually selected code with `gq`.
|
||||
For more ways to perform autoformatting type `:help gq`.
|
||||
|
||||
Supported formatprograms
|
||||
------------------------
|
||||
Here is a list of formatprograms that are currently supported.
|
||||
Generally, if you're running windows, I recommend placing the binary in `formatters/`.
|
||||
For linux this also suffices, but there are often more convenient ways to install the program.
|
||||
|
||||
* `astyle` for __C#, C++, C and Java__.
|
||||
It's probably in your distro's repository, so you can download it as a regular package.
|
||||
(For Ubuntu type `sudo apt-get install astyle` in a terminal)
|
||||
If you're running linux, it's probably in your distro's repository, so you can download it as a regular package.
|
||||
For Ubuntu type `sudo apt-get install astyle` in a terminal.
|
||||
Here is the link to the site: http://astyle.sourceforge.net/
|
||||
|
||||
* `jsbeautify` (the python version) for __Javascript__.
|
||||
This one can also be installed as a vundle package (if you use the vundle plugin).
|
||||
To do so, put this in your .vimrc: `Bundle "einars/jsbeautify"`.
|
||||
Note that we're only using the python version, so `node` doesn't have to be installed necessarily.
|
||||
Note that we're only using the python version, so `node` doesn't have to be installed.
|
||||
Here is the link to the repository: https://github.com/einars/js-beautify
|
||||
|
||||
|
||||
* `autopep8` for __Python__.
|
||||
It's probably in your distro's repository, so you can download it as a regular package.
|
||||
(For Ubuntu type `sudo apt-get install autopep8` in a terminal)
|
||||
If you're running linux, it's probably in your distro's repository, so you can download it as a regular package.
|
||||
For Ubuntu type `sudo apt-get install 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user