déplacement anciens bundles

master
Julien Rosset 11 years ago
parent f8ff681d59
commit e808e7c046

1
vim/.gitignore vendored

@ -1,2 +1,3 @@
.netrwhist
saveview/
bundle_old/

@ -1 +0,0 @@
Subproject commit 861d9297aa44a0f9ffd35259ddd980526fe6f715

@ -1 +0,0 @@
Subproject commit 53f6c95974f2f612e3ed677334af735d3727833f

@ -1 +0,0 @@
Subproject commit 7a5d7b8b09b0ec77aea10cde4ede65f34edf31dd

@ -1 +0,0 @@
Subproject commit 0b3d928dce8262dedfc2f83b9aeb59a94e4f0ae4

@ -1 +0,0 @@
Subproject commit b0bb781fc73ef40365e4c996a16f04368d64fc9d

File diff suppressed because it is too large Load Diff

@ -1 +0,0 @@
/home/soludev1/Git/vim-php/syntax/php_contents.vim

@ -1 +0,0 @@
/home/soludev1/Git/vim-php/syntax/php.vim

File diff suppressed because it is too large Load Diff

@ -1 +0,0 @@
Subproject commit 1852b5d386cdee4ba8aa8447e032e0bd01aaeef3

@ -1 +0,0 @@
Subproject commit dbc05b24a3da1541a211a2f6513777145258577a

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -1,114 +0,0 @@
<?php
/**
* Script to gather up all native functions, classes, and interfaces from any release of
* PHP for the purposes of updating the VIM syntax file.
*
* @author Paul Garvin <paul@paulgarvin.net>
* @copyright Copyright 2009 Paul Garvin
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
/**
* This script works by loading up PHP extensions and using reflection to pull
* the functions, classes, and constants out of those extesions. The list of extensions
* below are ones included with PHP 5.3 source code. The ones commented out depend on
* an external library being installed, are Unix specific, or just not commonly used.
*
* Add, comment, or uncomment to fit your needs or particular PHP installation.
* Remember that some of these extensions are likely shared extensions and must be
* enabled in your php.ini file.
*
* NOTE: mysqlnd is not included because it exposes no functions, classes, or constants.
* The pdo_* extensions are not included in the list because they do not expose any
* functions, classes, or constants themselves. The constants and methods specific
* to that driver are exposed though the PDO extension itself. The pdo_* extensions
* must still be enabled (compiled in or loaded as shared) for these constants to show up.
*/
$extensions = array(
'core', 'bcmath', 'bz2', 'calendar', 'com_dotnet',
'ctype', 'curl', 'date', /*'dba',*/ 'dom',
'enchant', 'ereg', 'exif', 'fileinfo', 'filter',
'ftp', 'gd', 'gettext', 'gmp', 'hash',
'iconv', 'imap', /*'interbase',*/ 'intl', 'json',
'ldap', 'libxml', 'mbstring', 'mcrypt', 'mhash',
/*'mssql',*/ 'mysql', 'mysqli', /*'oci8', 'oci8_11g',*/
'odbc', 'openssl', 'pcntl', 'pcre', 'pdo',
'pgsql', 'phar', /*'posix', 'pspell', 'readline',*/
/*'recode',*/ 'reflection', 'session', 'shmop', 'simplexml',
/*'snmp',*/ 'soap', 'sockets', 'spl', 'standard',
'sqlite', 'sqlite3', /*'sybase_ct', 'sysvmsg', 'sysvsem', 'sysvshm',*/
'tidy', 'tokenizer', 'xml', 'xmlreader', 'xmlwriter',
'xmlrpc', 'xsl', /*'wddx',*/ 'zip', 'zlib'
);
$out_file = '~/php_vimgen_out.vim'; // Pick your output file & location.
$out_str = '';
$store = array();
$errors = array();
foreach ($extensions as $ext) {
echo "Processing extension '$ext'." . PHP_EOL;
try {
$extension = new ReflectionExtension($ext);
$ext_info = array();
$ext_info['name'] = $extension->getName();
$ext_functions = array_keys($extension->getFunctions());
$ext_constants = array_keys($extension->getConstants());
$classes = $extension->getClasses();
$ext_classes = array();
foreach ($classes as $class) {
$ext_classes[] = $class->getName();
$ext_constants = array_merge($ext_constants, array_keys($class->getConstants()));
}
$ext_constants = array_unique($ext_constants);
if (count($ext_functions)) {
$ext_info['functions'] = implode(' ', $ext_functions);
}
if (count($ext_constants)) {
$ext_info['constants'] = implode(' ', $ext_constants);
}
if (count($ext_classes)) {
$ext_info['classes'] = implode(' ', $ext_classes);
}
} catch (Exception $e) {
$errors[] = "\"Error: '$ext' " . $e->getMessage() . "\n";
echo 'Error Encountered.' . PHP_EOL;
}
$store[$ext] = $ext_info;
}
$out_str .= "syn case match\n\n";
foreach ($store as $ext) {
if (isset($ext['constants'])) {
$out_str .= '" ' . $ext['name'] . "\n";
$out_str .= 'syn keyword phpConstants ' . $ext['constants'] . " contained\n\n";
}
}
$out_str .= "syn case ignore\n\n";
foreach ($store as $ext) {
$out_str .= '" ' . $ext['name'] . "\n";
if (isset($ext['functions'])) {
$out_str .= 'syn keyword phpFunctions ' . $ext['functions'] . " contained\n";
}
if (isset($ext['classes'])) {
$out_str .= 'syn keyword phpClasses ' . $ext['classes'] . " contained\n\n";
}
}
foreach ($errors as $error) {
$out_str .= "$error\n";
}
file_put_contents($out_file, $out_str);
?>

File diff suppressed because one or more lines are too long

@ -1,157 +0,0 @@
<?php
// Options:
// --no-zend
// --ignore=extension_name
$gen = new Generator($argv);
$gen->generate();
class Generator
{
private $file = null;
private $generator = null;
private $zend = true;
private $ignoredExtensions = array();
public function __construct($args)
{
$this->generator = implode(' ', $args);
$this->file = dirname(array_shift($args)).'/php_declaration.vim';
foreach($args as $arg)
{
if(strtolower($arg) == '--help' || strtolower($arg) == '-h')
{
}
elseif(strtolower($arg) == '--no-zend')
{
$this->zend = false;
}
elseif(preg_match('/^--ignore=([a-z0-9_]+(?:,[a-z0-9]+)*)$/i', $arg, $matches))
{
$ignore = explode(',', $matches[1]);
$this->ignoredExtensions = array_merge($this->ignoredExtensions, $ignore);
}
else
{
echo 'Unknown option "'.$arg.'"';
exit;
}
}
}
public function generate ()
{
$extensions = $this->_getExtensions(); // Récupère la liste des extensions PHP actives
$infos = array();
foreach($extensions as $extension)
$infos[$extension] = $this->_getExtensionContent($extension);
$this->_write($infos);
}
private function _getExtensions ()
{
$extensions = get_loaded_extensions(false); // Les extensions "classiques" de PHP
if($this->zend)
$extensions = array_merge($extensions, get_loaded_extensions(true)); // + les extensions Zend
sort($extensions);
echo "Founded ".count($extensions)." extension(s)\n";
return $extensions;
}
private function _getExtensionContent ($extension)
{
$reflex = new ReflectionExtension($extension);
echo "\tProcessing extension : ".$reflex->getName().", version ".$reflex->getVersion()."\n";
$info = (object)array(
'name' => $reflex->getName(),
'version' => $reflex->getVersion(),
'classes' => $reflex->getClassNames(),
'constants' => array_keys($reflex->getConstants()),
'functions' => array_keys($reflex->getFunctions())
);
echo "\t\t".count($info->classes)." class(es)\n";
echo "\t\t".count($info->constants)." constant(s)\n";
echo "\t\t".count($info->functions)." function(s)\n";
return $info;
}
private function _write ($infos)
{
$content = array();
$cluster = (object)array(
'classes' => array(),
'constants' => array(),
'functions' => array()
);
$content[] = "\" PHP classes, constantes and functions, by extensions for vim";
$content[] = "\" Generated by ".$this->generator;
$content[] = "";
$content[] = "";
foreach($infos as $name => $extension)
{
$content[] = "\" Extension: ".$extension->name." ".$extension->version." {{{1";
if(count($extension->classes))
{
$vimClass = 'phpClasses_'.$name;
$content[] = "\t\" Classes: {{{2";
$content[] = "syntax keyword ".$vimClass." ".implode(' ', $extension->classes)." contained";
$content[] = "\t\" }}}2";
$cluster->classes[] = $vimClass;
}
if(count($extension->constants))
{
$vimClass = 'phpConstants_'.$name;
$content[] = "\t\" Constants: {{{2";
$content[] = "syntax keyword ".$vimClass." ".implode(' ', $extension->constants)." contained";
$content[] = "\t\" }}}2";
$cluster->constants[] = $vimClass;
}
if(count($extension->functions))
{
$vimClass = 'phpFunctions_'.$name;
$content[] = "\t\" Functions: {{{2";
$content[] = "syntax keyword ".$vimClass." ".implode(' ', $extension->functions)." contained";
$content[] = "\t\" }}}2";
$cluster->functions[] = $vimClass;
}
$content[] = "\" }}}1";
$content[] = "";
}
$content[] = "";
$content[] = "\" Clusters: {{{1";
$content[] = "syntax cluster phpClClasses add=".implode(',', $cluster->classes);
$content[] = "syntax cluster phpClConstants add=".implode(',', $cluster->constants);
$content[] = "syntax cluster phpClfunctions add=".implode(',', $cluster->functions);
$content[] = "\" }}}1";
$content[] = "";
if(file_put_contents($this->file, implode("\n", $content)) === false)
echo "ERROR : writing in \"".$this->file."\" failed\n";
else
echo "File \"".$this->file."\" correctly generated\n";
}
}
?>

@ -1,65 +0,0 @@
" Vim syntax file
"
" Language: PHP 5.3
" Author: Julien Rosset <jul.rosset@gmail.com>
"
" Creation: April 9, 2013
" Last Change: April 9, 2013
"
" Version: 0.1
" Options: {{{1
" " php_short_tags=0/1 [1] : PHP short tags allowed ?
" }}}1
" Gère les cas où de la syntaxe est déjà définie
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
if !exists("main_syntax")
let main_syntax = 'php'
endif
" PHP insensible à la casse
syntax clear
syntax case ignore
" Lecture des options
function! s:getOption(name, default)
if exists('b:'.a:name)
return b:{a:name}
elseif exists('g:'.a:name)
return g:{a:name}
else
return a:defaut
endif
endfunction
let s:php_short_tags = s:getOption('php_short_tags', 1);
delfunction s:getOption
" Declaration PHP: <?php ... ?> {{{1
if s:php_short_tags == 1
syntax region phpPart matchgroup=phpDeclaration start=/<?\(php\)\?/ end=/?>/ keepend contains=CONTAINED
else
syntax region phpPart matchgroup=phpDeclaration start=/<?php/ end=/?>/ keepend contains=CONTAINED
endif
" }}}1
" Commentaires: /* ... */ // {{{1
syntax region phpComment start="/\*" end="\*/" keepend contained
syntax match phpComment "//.*$" contained
" }}}1
" Coloration: {{{1
hi link phpDeclaration Operator
hi link phpComment Comment
" }}}1

@ -1 +0,0 @@
Subproject commit 233e3c60ce3a357550f0878a91d94e79c3963728

@ -1 +0,0 @@
Subproject commit 61890d8e5ba8a873526fb91c6484aa445cc20b56

@ -1 +0,0 @@
Subproject commit 1270dceb1fe0ca35f8b292c7b41b45b42c5a0cc1

@ -1 +0,0 @@
Subproject commit 5b70f3edccd20f54ddfae0be8c3fad5daf6e87a7
Loading…
Cancel
Save