formatprg defaults changed, samples added and renamed

This commit is contained in:
Chiel92 2013-03-08 18:24:10 +01:00
parent f6d2a3f463
commit 005835befe
8 changed files with 11 additions and 10 deletions

View File

@ -50,9 +50,3 @@ au FileType * call s:set_formatprg()
"When current buffer changes, store b:formatprg into &formatprg "When current buffer changes, store b:formatprg into &formatprg
au BufEnter * if exists("b:formatprg") | let &formatprg = b:formatprg au BufEnter * if exists("b:formatprg") | let &formatprg = b:formatprg
"Set indent behaviour to match with the formatprg defaults
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4

View File

@ -1,11 +1,11 @@
let g:formatprg_cs = "astyle" let g:formatprg_cs = "astyle"
let g:formatprg_args_cs = "--mode=cs --style=ansi -p -P -c" let g:formatprg_args_cs = "--mode=cs --style=ansi -p -c -H"
let g:formatprg_c = "astyle" let g:formatprg_c = "astyle"
let g:formatprg_args_c = "--mode=c --style=ansi -p -P -c" let g:formatprg_args_c = "--mode=c --style=ansi -p -c -H"
let g:formatprg_cpp = "astyle" let g:formatprg_cpp = "astyle"
let g:formatprg_args_cpp = "--mode=c --style=ansi -p -P -c" let g:formatprg_args_cpp = "--mode=c --style=ansi -p -c -H"
let g:formatprg_java = "astyle" let g:formatprg_java = "astyle"
let g:formatprg_args_java = "--mode=java --style=ansi -p -P -c" let g:formatprg_args_java = "--mode=java --style=ansi -p -c -H"
let g:formatprg_php = "phpCB" let g:formatprg_php = "phpCB"
let g:formatprg_args_php = "--space-after-if --space-after-switch --space-after-while --space-before-start-angle-bracket --space-after-end-angle-bracket --one-true-brace-function-declaration --glue-amperscore --change-shell-comment-to-double-slashes-comment --force-large-php-code-tag --force-true-false-null-contant-lowercase --align-equal-statements --comment-rendering-style PEAR --equal-align-position 50 --padding-char-count 4" let g:formatprg_args_php = "--space-after-if --space-after-switch --space-after-while --space-before-start-angle-bracket --space-after-end-angle-bracket --one-true-brace-function-declaration --glue-amperscore --change-shell-comment-to-double-slashes-comment --force-large-php-code-tag --force-true-false-null-contant-lowercase --align-equal-statements --comment-rendering-style PEAR --equal-align-position 50 --padding-char-count 4"
let g:formatprg_python = "autopep8" let g:formatprg_python = "autopep8"
@ -17,6 +17,12 @@ let g:formatprg_args_html = "-q --show-errors 0 --show-warnings 0 --indent auto
let g:formatprg_javascript = "js-beautify" let g:formatprg_javascript = "js-beautify"
let g:formatprg_args_javascript = "-i" let g:formatprg_args_javascript = "-i"
"Set default indent behaviour to match with the formatprg defaults
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
"We allow an alternative path for js-beautify "We allow an alternative path for js-beautify
"If js-beautify is installed as a bundle, we still want to detect it "If js-beautify is installed as a bundle, we still want to detect it
let s:bundleDir = fnamemodify(expand("<sfile>"), ":h:h:h") let s:bundleDir = fnamemodify(expand("<sfile>"), ":h:h:h")

1
samples/csharp.cs Normal file
View File

@ -0,0 +1 @@
using System; class Program{static int Main(string[] args){Console.WriteLine(args[0]);int i=0;i++;return 0;}}