diff --git a/plugin/autoformat.vim b/plugin/autoformat.vim index 338bb93..2787a73 100644 --- a/plugin/autoformat.vim +++ b/plugin/autoformat.vim @@ -50,9 +50,3 @@ au FileType * call s:set_formatprg() "When current buffer changes, store b:formatprg into &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 diff --git a/plugin/formatprgdefaults.vim b/plugin/formatprgdefaults.vim index f6fd59d..643b7be 100644 --- a/plugin/formatprgdefaults.vim +++ b/plugin/formatprgdefaults.vim @@ -1,11 +1,11 @@ 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_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_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_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_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" @@ -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_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 "If js-beautify is installed as a bundle, we still want to detect it let s:bundleDir = fnamemodify(expand(""), ":h:h:h") diff --git a/samples/csharp.cs b/samples/csharp.cs new file mode 100644 index 0000000..ba1c867 --- /dev/null +++ b/samples/csharp.cs @@ -0,0 +1 @@ +using System; class Program{static int Main(string[] args){Console.WriteLine(args[0]);int i=0;i++;return 0;}} diff --git a/samples/html-test.html b/samples/html.html similarity index 100% rename from samples/html-test.html rename to samples/html.html diff --git a/samples/js-test.js b/samples/js.js similarity index 100% rename from samples/js-test.js rename to samples/js.js diff --git a/samples/js-test2.js b/samples/js2.js similarity index 100% rename from samples/js-test2.js rename to samples/js2.js diff --git a/samples/php-test.php b/samples/php.php similarity index 100% rename from samples/php-test.php rename to samples/php.php diff --git a/samples/python-test.py b/samples/python.py similarity index 100% rename from samples/python-test.py rename to samples/python.py