Merge branch 'alexdunn-master'
This commit is contained in:
commit
8ea12e45d6
10
README.md
10
README.md
@ -15,8 +15,8 @@ Put this in your .vimrc
|
|||||||
Plugin 'Chiel92/vim-autoformat'
|
Plugin 'Chiel92/vim-autoformat'
|
||||||
```
|
```
|
||||||
|
|
||||||
Then restart vim and run `:BundleInstall`.
|
Then restart vim and run `:PluginInstall`.
|
||||||
To update the plugin to the latest version, you can run `:BundleUpdate`.
|
To update the plugin to the latest version, you can run `:PluginUpdate`.
|
||||||
|
|
||||||
###Pathogen
|
###Pathogen
|
||||||
Download the source and extract in your bundle directory.
|
Download the source and extract in your bundle directory.
|
||||||
@ -63,6 +63,12 @@ It's probably in your distro's repository, so you can download it as a regular p
|
|||||||
For Ubuntu type `sudo apt-get install astyle` in a terminal.
|
For Ubuntu type `sudo apt-get install astyle` in a terminal.
|
||||||
Otherwise, download it here: http://astyle.sourceforge.net/.
|
Otherwise, download it here: http://astyle.sourceforge.net/.
|
||||||
|
|
||||||
|
* `clang-format` for __Objective-C__.
|
||||||
|
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/.
|
||||||
|
To to load style configuration from a .clang-format file, add to your .vimrc: `let g:format_args_objc = "-style=file"`.
|
||||||
|
Details: http://clang.llvm.org/docs/ClangFormat.html.
|
||||||
|
|
||||||
* `autopep8` for __Python__.
|
* `autopep8` for __Python__.
|
||||||
It's probably in your distro's repository, so you can download it as a regular package.
|
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.
|
For Ubuntu type `sudo apt-get install python-autopep8` in a terminal.
|
||||||
|
@ -13,6 +13,11 @@ if !exists("g:formatprg_args_expr_cpp") && !exists("g:formatprg_args_cpp")
|
|||||||
let g:formatprg_args_expr_cpp = '"--mode=c --style=ansi -pcH".(&expandtab ? "s".&shiftwidth : "t")'
|
let g:formatprg_args_expr_cpp = '"--mode=c --style=ansi -pcH".(&expandtab ? "s".&shiftwidth : "t")'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists("g:formatprg_objc") | let g:formatprg_objc = "clang-format" | endif
|
||||||
|
if !exists("g:formatprg_args_expr_objc") && !exists("g:formatprg_args_objc")
|
||||||
|
let g:formatprg_args_expr_objc = '"-style=\"{BasedOnStyle: WebKit, AlignTrailingComments: true, ".(&textwidth ? "ColumnLimit: ".&textwidth.", " : "").(&expandtab ? "UseTab: Never, IndentWidth: ".&shiftwidth : "UseTab: Always")."}\""'
|
||||||
|
endif
|
||||||
|
|
||||||
if !exists("g:formatprg_java") | let g:formatprg_java = "astyle" | endif
|
if !exists("g:formatprg_java") | let g:formatprg_java = "astyle" | endif
|
||||||
if !exists("g:formatprg_args_expr_java") && !exists("g:formatprg_args_java")
|
if !exists("g:formatprg_args_expr_java") && !exists("g:formatprg_args_java")
|
||||||
let g:formatprg_args_expr_java = '"--mode=java --style=ansi -pcH".(&expandtab ? "s".&shiftwidth : "t")'
|
let g:formatprg_args_expr_java = '"--mode=java --style=ansi -pcH".(&expandtab ? "s".&shiftwidth : "t")'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user