php support added and missing astyle files added

This commit is contained in:
Chiel92 2012-12-06 23:34:17 +01:00
parent 6b921283fb
commit 076a730a9e
7 changed files with 39 additions and 66 deletions

7
ftplugin/c.vim Normal file
View File

@ -0,0 +1,7 @@
"Set the formatter name and arguments for this filetype
let s:prgname = "astyle"
let s:arguments = "--mode=c --style=ansi"
"Set the formatprg option, if the formatter is installed
"globally or in the formatters/ folder
call g:FindFormatter(s:prgname, s:arguments)

7
ftplugin/cpp.vim Normal file
View File

@ -0,0 +1,7 @@
"Set the formatter name and arguments for this filetype
let s:prgname = "astyle"
let s:arguments = "--mode=cpp --style=ansi"
"Set the formatprg option, if the formatter is installed
"globally or in the formatters/ folder
call g:FindFormatter(s:prgname, s:arguments)

7
ftplugin/cs.vim Normal file
View File

@ -0,0 +1,7 @@
"Set the formatter name and arguments for this filetype
let s:prgname = "astyle"
let s:arguments = "--mode=cs --style=ansi"
"Set the formatprg option, if the formatter is installed
"globally or in the formatters/ folder
call g:FindFormatter(s:prgname, s:arguments)

3
ftplugin/html.vim Normal file
View File

@ -0,0 +1,3 @@
set expandtab
set tabstop=2
set shiftwidth=2

7
ftplugin/java.vim Normal file
View File

@ -0,0 +1,7 @@
"Set the formatter name and arguments for this filetype
let s:prgname = "astyle"
let s:arguments = "--mode=java --style=ansi"
"Set the formatprg option, if the formatter is installed
"globally or in the formatters/ folder
call g:FindFormatter(s:prgname, s:arguments)

View File

@ -1,5 +1,7 @@
let s:prgpath-"phpCB"
let s:arguments="--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"
if executable(s:prgpath)
let &formatprg=s:prgpath." ".s:arguments
endif
"Set the formatter name and arguments for this filetype
let s:prgname="phpCB"
let s:arguments="--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"
"Set the formatprg option, if the formatter is installed
"globally or in the formatters folder
call g:FindFormatter(s:prgname, s:arguments)

View File

@ -1,61 +1 @@
<?php echo "foo";
echo "";
echo "";
?> <html></html> <?php for() {
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "foo";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
}
?>
<?php mysql_connect("localhost", "root", ""); echo "foo"; mysql_select_db("mydatabase"); $query = "SELECT id, title FROM mytable ORDER BY title"; $result = mysql_query($query); echo "Total number of fields returned: " . mysql_num_fields($result) . ".<br />"; class phpVimeo { const API_REST_URL = 'http://vimeo.com/api/rest/v2'; const API_AUTH_URL = 'http://vimeo.com/oauth/authorize'; const API_ACCESS_TOKEN_URL = 'http://vimeo.com/oauth/access_token'; const API_REQUEST_TOKEN_URL = 'http://vimeo.com/oauth/request_token'; const CACHE_FILE = 'file'; private $_consumer_key = false; private $_consumer_secret = false; private $_cache_enabled = false; private $_cache_dir = false; private $_token = false; private $_token_secret = false; private $_upload_md5s = array(); public function __construct($consumer_key, $consumer_secret, $token = null, $token_secret = null){ $this -> _consumer_key = $consumer_key; $this -> _consumer_secret = $consumer_secret; if ($token && $token_secret) { $this -> setToken($token, $token_secret); } } } ?>