Configuration vim

master
Julien Rosset 12 years ago
parent 14549bb273
commit 529ed93987

1
vim/.gitignore vendored

@ -0,0 +1 @@
saveview/

@ -0,0 +1,326 @@
" pathogen.vim - path option manipulation
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 2.2
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
"
" For management of individually installed plugins in ~/.vim/bundle (or
" ~\vimfiles\bundle), adding `call pathogen#infect()` to the top of your
" .vimrc is the only other setup necessary.
"
" The API is documented inline below. For maximum ease of reading,
" :set foldmethod=marker
if exists("g:loaded_pathogen") || &cp
finish
endif
let g:loaded_pathogen = 1
function! s:warn(msg)
echohl WarningMsg
echomsg a:msg
echohl NONE
endfunction
" Point of entry for basic default usage. Give a relative path to invoke
" pathogen#incubate() (defaults to "bundle/{}"), or an absolute path to invoke
" pathogen#surround(). For backwards compatibility purposes, a full path that
" does not end in {} or * is given to pathogen#runtime_prepend_subdirectories()
" instead.
function! pathogen#infect(...) abort " {{{1
for path in a:0 ? reverse(copy(a:000)) : ['bundle/{}']
if path =~# '^[^\\/]\+$'
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#incubate(path . '/{}')
elseif path =~# '^[^\\/]\+[\\/]\%({}\|\*\)$'
call pathogen#incubate(path)
elseif path =~# '[\\/]\%({}\|\*\)$'
call pathogen#surround(path)
else
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#surround(path . '/{}')
endif
endfor
call pathogen#cycle_filetype()
return ''
endfunction " }}}1
" Split a path into a list.
function! pathogen#split(path) abort " {{{1
if type(a:path) == type([]) | return a:path | endif
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
endfunction " }}}1
" Convert a list to a path.
function! pathogen#join(...) abort " {{{1
if type(a:1) == type(1) && a:1
let i = 1
let space = ' '
else
let i = 0
let space = ''
endif
let path = ""
while i < a:0
if type(a:000[i]) == type([])
let list = a:000[i]
let j = 0
while j < len(list)
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
let path .= ',' . escaped
let j += 1
endwhile
else
let path .= "," . a:000[i]
endif
let i += 1
endwhile
return substitute(path,'^,','','')
endfunction " }}}1
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
function! pathogen#legacyjoin(...) abort " {{{1
return call('pathogen#join',[1] + a:000)
endfunction " }}}1
" Remove duplicates from a list.
function! pathogen#uniq(list) abort " {{{1
let i = 0
let seen = {}
while i < len(a:list)
if (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
call remove(a:list,i)
elseif a:list[i] ==# ''
let i += 1
let empty = 1
else
let seen[a:list[i]] = 1
let i += 1
endif
endwhile
return a:list
endfunction " }}}1
" \ on Windows unless shellslash is set, / everywhere else.
function! pathogen#separator() abort " {{{1
return !exists("+shellslash") || &shellslash ? '/' : '\'
endfunction " }}}1
" Convenience wrapper around glob() which returns a list.
function! pathogen#glob(pattern) abort " {{{1
let files = split(glob(a:pattern),"\n")
return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")')
endfunction "}}}1
" Like pathogen#glob(), only limit the results to directories.
function! pathogen#glob_directories(pattern) abort " {{{1
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
endfunction "}}}1
" Turn filetype detection off and back on again if it was already enabled.
function! pathogen#cycle_filetype() " {{{1
if exists('g:did_load_filetypes')
filetype off
filetype on
endif
endfunction " }}}1
" Check if a bundle is disabled. A bundle is considered disabled if it ends
" in a tilde or its basename or full name is included in the list
" g:pathogen_disabled.
function! pathogen#is_disabled(path) " {{{1
if a:path =~# '\~$'
return 1
elseif !exists("g:pathogen_disabled")
return 0
endif
let sep = pathogen#separator()
let blacklist = g:pathogen_disabled
return index(blacklist, strpart(a:path, strridx(a:path, sep)+1)) != -1 && index(blacklist, a:path) != 1
endfunction "}}}1
" Prepend the given directory to the runtime path and append its corresponding
" after directory. If the directory is already included, move it to the
" outermost position. Wildcards are added as is. Ending a path in /{} causes
" all subdirectories to be added (except those in g:pathogen_disabled).
function! pathogen#surround(path) abort " {{{1
let sep = pathogen#separator()
let rtp = pathogen#split(&rtp)
if a:path =~# '[\\/]{}$'
let path = fnamemodify(a:path[0:-4], ':p:s?[\\/]\=$??')
let before = filter(pathogen#glob_directories(path.sep.'*'), '!pathogen#is_disabled(v:val)')
let after = filter(reverse(pathogen#glob_directories(path.sep."*".sep."after")), '!pathogen#is_disabled(v:val[0:-7])')
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
else
let path = fnamemodify(a:path, ':p:s?[\\/]\=$??')
let before = [path]
let after = [path . sep . 'after']
call filter(rtp, 'index(before + after, v:val) == -1')
endif
let &rtp = pathogen#join(before, rtp, after)
return &rtp
endfunction " }}}1
" Prepend all subdirectories of path to the rtp, and append all 'after'
" directories in those subdirectories. Deprecated.
function! pathogen#runtime_prepend_subdirectories(path) " {{{1
call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#surround('.string(a:path.'/{}').')')
return pathogen#surround(a:path . pathogen#separator() . '{}')
endfunction " }}}1
" For each directory in the runtime path, add a second entry with the given
" argument appended. If the argument ends in '/{}', add a separate entry for
" each subdirectory. The default argument is 'bundle/{}', which means that
" .vim/bundle/*, $VIM/vimfiles/bundle/*, $VIMRUNTIME/bundle/*,
" $VIM/vim/files/bundle/*/after, and .vim/bundle/*/after will be added (on
" UNIX).
function! pathogen#incubate(...) abort " {{{1
let sep = pathogen#separator()
let name = a:0 ? a:1 : 'bundle/{}'
if "\n".s:done_bundles =~# "\\M\n".name."\n"
return ""
endif
let s:done_bundles .= name . "\n"
let list = []
for dir in pathogen#split(&rtp)
if dir =~# '\<after$'
if name =~# '{}$'
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name[0:-3],'').'*'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir]
else
let list += [dir, substitute(dir, 'after$', '', '') . name . sep . 'after']
endif
else
if name =~# '{}$'
let list += [dir] + filter(pathogen#glob_directories(dir.sep.name[0:-3].'*'), '!pathogen#is_disabled(v:val)')
else
let list += [dir . sep . name, dir]
endif
endif
endfor
let &rtp = pathogen#join(pathogen#uniq(list))
return 1
endfunction " }}}1
" Deprecated alias for pathogen#incubate().
function! pathogen#runtime_append_all_bundles(...) abort " {{{1
if a:0
call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#incubate('.string(a:1.'/{}').')')
else
call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#incubate()')
endif
return call('pathogen#incubate', map(copy(a:000),'v:val . "/{}"'))
endfunction
let s:done_bundles = ''
" }}}1
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
function! pathogen#helptags() abort " {{{1
let sep = pathogen#separator()
for glob in pathogen#split(&rtp)
for dir in split(glob(glob), "\n")
if (dir.sep)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir.sep.'doc') == 2 && !empty(filter(split(glob(dir.sep.'doc'.sep.'*'),"\n>"),'!isdirectory(v:val)')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags'))
silent! execute 'helptags' pathogen#fnameescape(dir.'/doc')
endif
endfor
endfor
endfunction " }}}1
command! -bar Helptags :call pathogen#helptags()
" Execute the given command. This is basically a backdoor for --remote-expr.
function! pathogen#execute(...) abort " {{{1
for command in a:000
execute command
endfor
return ''
endfunction " }}}1
" Like findfile(), but hardcoded to use the runtimepath.
function! pathogen#runtime_findfile(file,count) abort "{{{1
let rtp = pathogen#join(1,pathogen#split(&rtp))
let file = findfile(a:file,rtp,a:count)
if file ==# ''
return ''
else
return fnamemodify(file,':p')
endif
endfunction " }}}1
" Backport of fnameescape().
function! pathogen#fnameescape(string) abort " {{{1
if exists('*fnameescape')
return fnameescape(a:string)
elseif a:string ==# '-'
return '\-'
else
return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','')
endif
endfunction " }}}1
if exists(':Vedit')
finish
endif
let s:vopen_warning = 0
function! s:find(count,cmd,file,lcd) " {{{1
let rtp = pathogen#join(1,pathogen#split(&runtimepath))
let file = pathogen#runtime_findfile(a:file,a:count)
if file ==# ''
return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'"
endif
if !s:vopen_warning
let s:vopen_warning = 1
let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE'
else
let warning = ''
endif
if a:lcd
let path = file[0:-strlen(a:file)-2]
execute 'lcd `=path`'
return a:cmd.' '.pathogen#fnameescape(a:file) . warning
else
return a:cmd.' '.pathogen#fnameescape(file) . warning
endif
endfunction " }}}1
function! s:Findcomplete(A,L,P) " {{{1
let sep = pathogen#separator()
let cheats = {
\'a': 'autoload',
\'d': 'doc',
\'f': 'ftplugin',
\'i': 'indent',
\'p': 'plugin',
\'s': 'syntax'}
if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0])
let request = cheats[a:A[0]].a:A[1:-1]
else
let request = a:A
endif
let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*'
let found = {}
for path in pathogen#split(&runtimepath)
let path = expand(path, ':p')
let matches = split(glob(path.sep.pattern),"\n")
call map(matches,'isdirectory(v:val) ? v:val.sep : v:val')
call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]')
for match in matches
let found[match] = 1
endfor
endfor
return sort(keys(found))
endfunction " }}}1
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(<count>,'edit<bang>',<q-args>,0)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>,0)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read',<q-args>,<bang>1)
" vim:set et sw=2:

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

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

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

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

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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

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

@ -0,0 +1 @@
Subproject commit 3c37ddcc140ed4f5aa1b85f0dc476b410d1bacb3

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

@ -0,0 +1,114 @@
<?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

@ -0,0 +1,157 @@
<?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";
}
}
?>

@ -0,0 +1,65 @@
" 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

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

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

@ -0,0 +1 @@
Subproject commit 124550cfee33a1bb9a227e78ccc709317a89dae9

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

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

@ -0,0 +1,231 @@
" Vim color file
"
" Author: Tomas Restrepo <tomas@winterdom.com>
"
" Note: Based on the monokai theme for textmate
" by Wimer Hazenberg and its darker variant
" by Hamish Stuart Macpherson
"
hi clear
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="molokai"
if exists("g:molokai_original")
let s:molokai_original = g:molokai_original
else
let s:molokai_original = 0
endif
hi Boolean guifg=#AE81FF
hi Character guifg=#E6DB74
hi Number guifg=#AE81FF
hi String guifg=#E6DB74
hi Conditional guifg=#F92672 gui=bold
hi Constant guifg=#AE81FF gui=bold
hi Cursor guifg=#000000 guibg=#000000
hi Debug guifg=#BCA3A3 gui=bold
hi Define guifg=#66D9EF
hi Delimiter guifg=#8F8F8F
hi DiffAdd guibg=#13354A
hi DiffChange guifg=#89807D guibg=#4C4745
hi DiffDelete guifg=#960050 guibg=#1E0010
hi DiffText guibg=#4C4745 gui=italic,bold
hi Directory guifg=#A6E22E gui=bold
hi Error guifg=#960050 guibg=#FF0000
hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold
hi Exception guifg=#A6E22E gui=bold
hi Float guifg=#AE81FF
hi FoldColumn guifg=#465457 guibg=#000000
hi Folded guifg=#465457 guibg=#000000
hi Function guifg=#8FC327
hi Identifier guifg=#FD971F
hi Ignore guifg=#808080 guibg=bg
hi IncSearch guifg=#C4BE89 guibg=#000000
hi Keyword guifg=#F92672 gui=bold
hi Label guifg=#E6DB74 gui=none
hi Macro guifg=#C4BE89 gui=italic
hi SpecialKey guifg=#66D9EF gui=italic
hi MatchParen guifg=#000000 guibg=#FD971F gui=bold
hi ModeMsg guifg=#E6DB74
hi MoreMsg guifg=#E6DB74
hi Operator guifg=#F92672
" complete menu
hi Pmenu guifg=#66D9EF guibg=#000000
hi PmenuSel guibg=#808080
hi PmenuSbar guibg=#080808
hi PmenuThumb guifg=#66D9EF
hi PreCondit guifg=#A6E22E gui=bold
hi PreProc guifg=#A6E22E
hi Question guifg=#66D9EF
hi Repeat guifg=#F92672 gui=bold
hi Search guifg=#FFFFFF guibg=#455354
" marks column
hi SignColumn guifg=#A6E22E guibg=#232526
hi SpecialChar guifg=#F92672 gui=bold
hi SpecialComment guifg=#7E8E91 gui=bold
hi Special guifg=#66D9EF guibg=bg gui=italic
if has("spell")
hi SpellBad guisp=#FF0000 gui=undercurl
hi SpellCap guisp=#7070F0 gui=undercurl
hi SpellLocal guisp=#70F0F0 gui=undercurl
hi SpellRare guisp=#FFFFFF gui=undercurl
endif
hi Statement guifg=#F92672 gui=bold
hi StatusLine guifg=#455354 guibg=fg
hi StatusLineNC guifg=#808080 guibg=#080808
hi StorageClass guifg=#FD971F gui=italic
hi Structure guifg=#66D9EF
hi Tag guifg=#F92672 gui=italic
hi Title guifg=#ef5939
hi Todo guifg=#FFFFFF guibg=bg gui=bold
hi Typedef guifg=#66D9EF
hi Type guifg=#66D9EF gui=none
hi Underlined guifg=#808080 gui=underline
hi VertSplit guifg=#808080 guibg=#080808 gui=bold
hi VisualNOS guibg=#403D3D
hi Visual guibg=#403D3D
hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold
hi WildMenu guifg=#66D9EF guibg=#000000
if s:molokai_original == 1
hi Normal guifg=#F8F8F2 guibg=#272822
hi Comment guifg=#75715E
hi CursorLine guibg=#000000
hi CursorColumn guibg=#000000
hi ColorColumn guibg=#000000
hi LineNr guifg=#BCBCBC guibg=#3B3A32
hi NonText guifg=#75715E
hi SpecialKey guifg=#75715E
else
hi Normal guifg=#F8F8F2 guibg=#1B1D1E
hi Comment guifg=#7E8E91
hi CursorLine guibg=#000000
hi CursorColumn guibg=#000000
hi ColorColumn guibg=#000000
hi LineNr guifg=#465457 guibg=#232526
hi NonText guifg=#465457
hi SpecialKey guifg=#465457
end
"
" Support for 256-color terminal
"
if &t_Co > 255
if s:molokai_original == 1
hi Normal ctermbg=234
hi CursorLine ctermbg=16 cterm=none
else
" changé ctermbg
hi Normal ctermfg=252 ctermbg=234
hi CursorLine ctermbg=16 cterm=none
endif
hi Boolean ctermfg=135
hi Character ctermfg=144
hi Number ctermfg=135
" changé
hi String ctermfg=143
hi Conditional ctermfg=161 cterm=bold
hi Constant ctermfg=135 cterm=bold
hi Cursor ctermfg=16 ctermbg=16
hi Debug ctermfg=225 cterm=bold
hi Define ctermfg=81
hi Delimiter ctermfg=241
hi DiffAdd ctermbg=24
hi DiffChange ctermfg=181 ctermbg=239
hi DiffDelete ctermfg=162 ctermbg=53
hi DiffText ctermbg=102 cterm=bold
hi Directory ctermfg=106 cterm=bold
hi Error ctermfg=219 ctermbg=196
hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold
hi Exception ctermfg=106 cterm=bold
hi Float ctermfg=135
hi FoldColumn ctermfg=67 ctermbg=16
hi Folded ctermfg=67 ctermbg=16
hi Function ctermfg=106
hi Identifier ctermfg=208 cterm=none
hi Ignore ctermfg=244 ctermbg=232
hi IncSearch ctermfg=193 ctermbg=16
hi Keyword ctermfg=161 cterm=bold
hi Label ctermfg=229 cterm=none
hi Macro ctermfg=193
hi SpecialKey ctermfg=81
hi MatchParen ctermfg=16 ctermbg=208 cterm=bold
hi ModeMsg ctermfg=229
hi MoreMsg ctermfg=229
hi Operator ctermfg=161
" complete menu
hi Pmenu ctermfg=81 ctermbg=16
hi PmenuSel ctermbg=244
hi PmenuSbar ctermbg=232
hi PmenuThumb ctermfg=81
hi PreCondit ctermfg=106 cterm=bold
hi PreProc ctermfg=106
hi Question ctermfg=81
hi Repeat ctermfg=161 cterm=bold
hi Search ctermfg=253 ctermbg=66
" marks column
hi SignColumn ctermfg=106 ctermbg=235
hi SpecialChar ctermfg=161 cterm=bold
hi SpecialComment ctermfg=245 cterm=bold
hi Special ctermfg=81
hi Statement ctermfg=161 cterm=bold
hi StatusLine ctermfg=238 ctermbg=253
hi StatusLineNC ctermfg=244 ctermbg=232
hi StorageClass ctermfg=208
hi Structure ctermfg=81
hi Tag ctermfg=161
hi Title ctermfg=166
hi Todo ctermfg=231 ctermbg=232 cterm=bold
hi Typedef ctermfg=81
hi Type ctermfg=81 cterm=none
hi Underlined ctermfg=244 cterm=underline
hi VertSplit ctermfg=244 ctermbg=232 cterm=bold
hi VisualNOS ctermbg=238
hi Visual ctermbg=16
hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold
hi WildMenu ctermfg=81 ctermbg=16
" changé
hi Comment ctermfg=245
hi CursorColumn ctermbg=16
hi ColorColumn ctermbg=16
" changé
"hi LineNr ctermfg=250 ctermbg=234
hi LineNr ctermfg=240 ctermbg=235
hi NonText ctermfg=59
hi SpecialKey ctermfg=59
end

@ -0,0 +1,231 @@
" Vim color file
"
" Author: Tomas Restrepo <tomas@winterdom.com>
"
" Note: Based on the monokai theme for textmate
" by Wimer Hazenberg and its darker variant
" by Hamish Stuart Macpherson
"
hi clear
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="molokai"
if exists("g:molokai_original")
let s:molokai_original = g:molokai_original
else
let s:molokai_original = 0
endif
hi Boolean guifg=#AE81FF
hi Character guifg=#E6DB74
hi Number guifg=#AE81FF
hi String guifg=#E6DB74
hi Conditional guifg=#F92672 gui=bold
hi Constant guifg=#AE81FF gui=bold
hi Cursor guifg=#000000 guibg=#F8F8F0
hi Debug guifg=#BCA3A3 gui=bold
hi Define guifg=#66D9EF
hi Delimiter guifg=#8F8F8F
hi DiffAdd guibg=#13354A
hi DiffChange guifg=#89807D guibg=#4C4745
hi DiffDelete guifg=#960050 guibg=#1E0010
hi DiffText guibg=#4C4745 gui=italic,bold
hi Directory guifg=#A6E22E gui=bold
hi Error guifg=#960050 guibg=#1E0010
hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold
hi Exception guifg=#A6E22E gui=bold
hi Float guifg=#AE81FF
hi FoldColumn guifg=#465457 guibg=#000000
hi Folded guifg=#465457 guibg=#000000
hi Function guifg=#A6E22E
hi Identifier guifg=#FD971F
hi Ignore guifg=#808080 guibg=bg
hi IncSearch guifg=#C4BE89 guibg=#000000
hi Keyword guifg=#F92672 gui=bold
hi Label guifg=#E6DB74 gui=none
hi Macro guifg=#C4BE89 gui=italic
hi SpecialKey guifg=#66D9EF gui=italic
hi MatchParen guifg=#000000 guibg=#FD971F gui=bold
hi ModeMsg guifg=#E6DB74
hi MoreMsg guifg=#E6DB74
hi Operator guifg=#F92672
" complete menu
hi Pmenu guifg=#66D9EF guibg=#000000
hi PmenuSel guibg=#808080
hi PmenuSbar guibg=#080808
hi PmenuThumb guifg=#66D9EF
hi PreCondit guifg=#A6E22E gui=bold
hi PreProc guifg=#A6E22E
hi Question guifg=#66D9EF
hi Repeat guifg=#F92672 gui=bold
hi Search guifg=#FFFFFF guibg=#455354
" marks column
hi SignColumn guifg=#A6E22E guibg=#232526
hi SpecialChar guifg=#F92672 gui=bold
hi SpecialComment guifg=#7E8E91 gui=bold
hi Special guifg=#66D9EF guibg=bg gui=italic
if has("spell")
hi SpellBad guisp=#FF0000 gui=undercurl
hi SpellCap guisp=#7070F0 gui=undercurl
hi SpellLocal guisp=#70F0F0 gui=undercurl
hi SpellRare guisp=#FFFFFF gui=undercurl
endif
hi Statement guifg=#F92672 gui=bold
hi StatusLine guifg=#455354 guibg=fg
hi StatusLineNC guifg=#808080 guibg=#080808
hi StorageClass guifg=#FD971F gui=italic
hi Structure guifg=#66D9EF
hi Tag guifg=#F92672 gui=italic
hi Title guifg=#ef5939
hi Todo guifg=#FFFFFF guibg=bg gui=bold
hi Typedef guifg=#66D9EF
hi Type guifg=#66D9EF gui=none
hi Underlined guifg=#808080 gui=underline
hi VertSplit guifg=#808080 guibg=#080808 gui=bold
hi VisualNOS guibg=#403D3D
hi Visual guibg=#403D3D
hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold
hi WildMenu guifg=#66D9EF guibg=#000000
if s:molokai_original == 1
hi Normal guifg=#F8F8F2 guibg=#272822
hi Comment guifg=#75715E
hi CursorLine guibg=#3E3D32
hi CursorColumn guibg=#3E3D32
hi ColorColumn guibg=#3B3A32
hi LineNr guifg=#BCBCBC guibg=#3B3A32
hi NonText guifg=#75715E
hi SpecialKey guifg=#75715E
else
hi Normal guifg=#F8F8F2 guibg=#1B1D1E
hi Comment guifg=#7E8E91
hi CursorLine guibg=#293739
hi CursorColumn guibg=#293739
hi ColorColumn guibg=#232526
hi LineNr guifg=#465457 guibg=#232526
hi NonText guifg=#465457
hi SpecialKey guifg=#465457
end
"
" Support for 256-color terminal
"
if &t_Co > 255
if s:molokai_original == 1
hi Normal ctermbg=234
hi CursorLine ctermbg=235 cterm=none
else
" changé ctermbg
hi Normal ctermfg=252 ctermbg=234
hi CursorLine ctermbg=234 cterm=none
endif
hi Boolean ctermfg=135
hi Character ctermfg=144
hi Number ctermfg=135
" changé
hi String ctermfg=143
hi Conditional ctermfg=161 cterm=bold
hi Constant ctermfg=135 cterm=bold
hi Cursor ctermfg=16 ctermbg=253
hi Debug ctermfg=225 cterm=bold
hi Define ctermfg=81
hi Delimiter ctermfg=241
hi DiffAdd ctermbg=24
hi DiffChange ctermfg=181 ctermbg=239
hi DiffDelete ctermfg=162 ctermbg=53
hi DiffText ctermbg=102 cterm=bold
hi Directory ctermfg=118 cterm=bold
hi Error ctermfg=219 ctermbg=89
hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold
hi Exception ctermfg=118 cterm=bold
hi Float ctermfg=135
hi FoldColumn ctermfg=67 ctermbg=16
hi Folded ctermfg=67 ctermbg=16
hi Function ctermfg=118
hi Identifier ctermfg=208 cterm=none
hi Ignore ctermfg=244 ctermbg=232
hi IncSearch ctermfg=193 ctermbg=16
hi Keyword ctermfg=161 cterm=bold
hi Label ctermfg=229 cterm=none
hi Macro ctermfg=193
hi SpecialKey ctermfg=81
hi MatchParen ctermfg=16 ctermbg=208 cterm=bold
hi ModeMsg ctermfg=229
hi MoreMsg ctermfg=229
hi Operator ctermfg=161
" complete menu
hi Pmenu ctermfg=81 ctermbg=16
hi PmenuSel ctermbg=244
hi PmenuSbar ctermbg=232
hi PmenuThumb ctermfg=81
hi PreCondit ctermfg=118 cterm=bold
hi PreProc ctermfg=118
hi Question ctermfg=81
hi Repeat ctermfg=161 cterm=bold
hi Search ctermfg=253 ctermbg=66
" marks column
hi SignColumn ctermfg=118 ctermbg=235
hi SpecialChar ctermfg=161 cterm=bold
hi SpecialComment ctermfg=245 cterm=bold
hi Special ctermfg=81
hi Statement ctermfg=161 cterm=bold
hi StatusLine ctermfg=238 ctermbg=253
hi StatusLineNC ctermfg=244 ctermbg=232
hi StorageClass ctermfg=208
hi Structure ctermfg=81
hi Tag ctermfg=161
hi Title ctermfg=166
hi Todo ctermfg=231 ctermbg=232 cterm=bold
hi Typedef ctermfg=81
hi Type ctermfg=81 cterm=none
hi Underlined ctermfg=244 cterm=underline
hi VertSplit ctermfg=244 ctermbg=232 cterm=bold
hi VisualNOS ctermbg=238
hi Visual ctermbg=235
hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold
hi WildMenu ctermfg=81 ctermbg=16
" changé
hi Comment ctermfg=245
hi CursorColumn ctermbg=234
hi ColorColumn ctermbg=234
" changé
"hi LineNr ctermfg=250 ctermbg=234
hi LineNr ctermfg=240 ctermbg=235
hi NonText ctermfg=59
hi SpecialKey ctermfg=59
end

@ -0,0 +1,25 @@
#!/bin/bash
#
# Met à jour un plugin via git
#
function majGit() {
plugin=$1
echo -e "mise à jour de \033[1m$plugin\033[0m..."
cd ~/.vim/bundle/$plugin && git pull
}
majGit "html5.vim"
majGit "syntastic"
majGit "supertab"
majGit "vim-jquery"
majGit "nerdcommenter"
majGit "vim-pathogen"
majGit "htmljinja"
majGit "Better-CSS-Syntax-for-Vim"
majGit "nerdtree"
majGit "tagbar"
majGit "vim-airline"
majGit "vim-bufferline"
majGit "vim-fugitive"

@ -0,0 +1,594 @@
" DoxyGen syntax hilighting extension for c/c++/idl/java
" Language: doxygen on top of c, cpp, idl, java, php
" Maintainer: Michael Geddes <vimmer@frog.wheelycreek.net>
" Author: Michael Geddes
" Last Change: Jan 2009
" Version: 1.23
"
" Copyright 2004-2008 Michael Geddes
" Please feel free to use, modify & distribute all or part of this script,
" providing this copyright message remains.
" I would appreciate being acknowledged in any derived scripts, and would
" appreciate and welcome any updates, modifications or suggestions.
" NOTE: Comments welcome!
"
" There are two variables that control the syntax highlighting produced by this
" script:
" doxygen_enhanced_colour - Use the (non-standard) original colours designed
" for this highlighting.
" doxygen_my_rendering - Disable the HTML bold/italic/underline rendering.
"
" A brief description without '.' or '!' will cause the end comment
" character to be marked as an error. You can define the colour of this using
" the highlight doxygenErrorComment.
" A \link without an \endlink will cause an error highlight on the end-comment.
" This is defined by doxygenLinkError
"
" The variable g:doxygen_codeword_font can be set to the guifont for marking \c
" words - a 'typewriter' like font normally. Spaces must be escaped. It can
" also be set to any highlight attribute. Alternatively, a highlight for doxygenCodeWord
" can be used to override it.
"
" By default, highlighting is done assuming you have the JAVADOC_AUTOBRIEF
" setting turned on in your Doxygen configuration. If you don't, you
" can set the variable g:doxygen_javadoc_autobrief to 0 to have the
" highlighting more accurately reflect the way Doxygen will interpret your
" comments.
"
" Support for cpp, c, idl, doxygen and php.
"
" Special thanks to: Wu Yongwei, Toby Allsopp
"
if exists('b:suppress_doxygen')
unlet b:suppress_doxygen
finish
endif
if exists('b:current_syntax') && b:current_syntax =~ 'doxygen' && !exists('doxygen_debug_script')
finish
endif
let s:cpo_save = &cpo
try
set cpo&vim
" Start of Doxygen syntax hilighting:
"
" C/C++ Style line comments
syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend fold containedin=phpRegion
syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl nextgroup=doxygenComment2 fold containedin=phpRegion
syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl fold containedin=phpRegion
syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial,@Spell fold containedin=phpRegion
" Single line brief followed by multiline comment.
syn region doxygenComment2 start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contained contains=doxygenSyncStart2,doxygenStart2,doxygenTODO keepend fold
" This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched.
syn match doxygenSyncStart2 +[^*/]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenSkipComment,doxygenStartSkip2 skipwhite skipnl
" Skip empty lines at the start for when comments start on the 2nd/3rd line.
syn match doxygenStartSkip2 +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkip skipwhite skipnl
syn match doxygenStartSkip2 +^\s*\*$+ contained nextgroup=doxygenBody,doxygenStartSpecial,,doxygenStartSkip skipwhite skipnl
syn match doxygenStart2 +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenStartSkip2 skipwhite skipnl
" Match the Starting pattern (effectively creating the start of a BNF)
if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief
syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenBriefL,doxygenSpecial skipwhite
" Match the first sentence as a brief comment
if ! exists('g:doxygen_end_punctuation')
let g:doxygen_end_punctuation='[.]'
endif
exe 'syn region doxygenBrief contained start=+[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]+ start=+\(^\s*\)\@<!\*/\@!+ start=+\<\k+ skip=+'.doxygen_end_punctuation.'\S\@=+ end=+'.doxygen_end_punctuation.'+ end=+\(\s*\(\n\s*\*\=\s*\)[@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\@=+ contains=doxygenSmallSpecial,doxygenContinueComment,doxygenBriefEndComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipnl nextgroup=doxygenBody'
syn match doxygenBriefEndComment +\*/+ contained
exe 'syn region doxygenBriefL start=+@\k\@!\|[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@]+ start=+\<+ skip=+'.doxygen_end_punctuation.'\S+ end=+'.doxygen_end_punctuation.'\|$+ contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell keepend'
syn match doxygenPrevL +<+ contained nextgroup=doxygenBriefL,doxygenSpecial skipwhite
else
syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenLine,doxygenSpecial skipwhite
syn region doxygenLine start=+@\k\@!\|[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@<]+ start=+\<+ end='$' contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell keepend
syn match doxygenPrevL +<+ contained nextgroup=doxygenLine,doxygenSpecial skipwhite
endif
" This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched.
syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipwhite keepend
" Match a '<' for applying a comment to the previous element.
syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenBody,doxygenSpecial,doxygenStartSkip skipwhite
if exists("c_comment_strings")
" These are anti-Doxygen comments. If there are more than two asterisks or 3 '/'s
" then turn the comments back into normal C comments.
syn region cComment start="/\*\*\*" end="\*/" contains=@cCommentGroup,cCommentString,cCharacter,cNumbersCom,cSpaceError
syn region cCommentL start="////" skip="\\$" end="$" contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError
else
syn region cComment start="/\*\*\*" end="\*/" contains=@cCommentGroup,cSpaceError
syn region cCommentL start="////" skip="\\$" end="$" contains=@cCommentGroup,cSpaceError
endif
" Special commands at the start of the area: starting with '@' or '\'
syn region doxygenStartSpecial contained start=+[@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=doxygenSpecial nextgroup=doxygenSkipComment skipnl keepend
syn match doxygenSkipComment contained +^\s*\*/\@!+ nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenPage skipwhite
"syn region doxygenBodyBit contained start=+$+
" The main body of a doxygen comment.
syn region doxygenBody contained start=+\(/\*[*!]\)\@<!<\|[^<]\|$+ matchgroup=doxygenEndComment end=+\*/+re=e-2,me=e-2 contains=doxygenContinueComment,doxygenTODO,doxygenSpecial,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell
" These allow the skipping of comment continuation '*' characters.
syn match doxygenContinueComment contained +^\s*\*/\@!\s*+
" Catch a Brief comment without punctuation - flag it as an error but
" make sure the end comment is picked up also.
syn match doxygenErrorComment contained +\*/+
" Skip empty lines at the start for when comments start on the 2nd/3rd line.
if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief
syn match doxygenStartSkip +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
syn match doxygenStartSkip +^\s*\*$+ contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
else
syn match doxygenStartSkip +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage,doxygenBody skipwhite skipnl
syn match doxygenStartSkip +^\s*\*$+ contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage,doxygenBody skipwhite skipnl
endif
" Match an [@\]brief so that it moves to body-mode.
"
"
" syn match doxygenBriefLine contained
syn match doxygenBriefSpecial contained +[@\\]+ nextgroup=doxygenBriefWord skipwhite
syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained
" Create the single word matching special identifiers.
fun! s:DxyCreateSmallSpecial( kword, name )
let mx='[-:0-9A-Za-z_%=&+*/!~>|]\@<!\([-0-9A-Za-z_%=+*/!~>|#$]\+[-0-9A-Za-z_%=+*/!~>|]\@!\|\\[\\<>&.]@\|[.,][0-9a-zA-Z_]\@=\|::\|([^)]*)\|&[0-9a-zA-Z]\{2,7};\)\+'
exe 'syn region doxygenSpecial'.a:name.'Word contained start=+'.a:kword.'+ end=+\(\_s\+'.mx.'\)\@<=[-a-zA-Z_0-9+*/^%|~!=&\\]\@!+ skipwhite contains=doxygenContinueComment,doxygen'.a:name.'Word'
exe 'syn match doxygen'.a:name.'Word contained "\_s\@<='.mx.'" contains=doxygenHtmlSpecial,@Spell keepend'
endfun
call s:DxyCreateSmallSpecial('p', 'Code')
call s:DxyCreateSmallSpecial('c', 'Code')
call s:DxyCreateSmallSpecial('b', 'Bold')
call s:DxyCreateSmallSpecial('e', 'Emphasised')
call s:DxyCreateSmallSpecial('em', 'Emphasised')
call s:DxyCreateSmallSpecial('a', 'Argument')
call s:DxyCreateSmallSpecial('ref', 'Ref')
delfun s:DxyCreateSmallSpecial
syn match doxygenSmallSpecial contained +[@\\]\(\<[npcbea]\>\|\<em\>\|\<ref\>\|\<link\>\|f\$\|[$\\&<>#]\)\@=+ nextgroup=doxygenOtherLink,doxygenHyperLink,doxygenHashLink,doxygenFormula,doxygenSymbol,doxygenSpecial.*Word
" Now for special characters
syn match doxygenSpecial contained +[@\\]\(\<[npcbea]\>\|\<em\>\|\<ref\|\<link\>\>\|\<f\$\|[$\\&<>#]\)\@!+ nextgroup=doxygenParam,doxygenRetval,doxygenBriefWord,doxygenBold,doxygenBOther,doxygenOther,doxygenOtherTODO,doxygenOtherWARN,doxygenOtherBUG,doxygenPage,doxygenGroupDefine,doxygenCodeRegion,doxygenVerbatimRegion,doxygenDotRegion
" doxygenOtherLink,doxygenSymbol,doxygenFormula,doxygenErrorSpecial,doxygenSpecial.*Word
"
syn match doxygenGroupDefine contained +@\@<=[{}]+
syn match doxygenGroupDefineSpecial contained +@\ze[{}]+
syn match doxygenErrorSpecial contained +\s+
" Match parameters and retvals (highlighting the first word as special).
syn match doxygenParamDirection contained "\v\[(\s*in>((]\s*\[|\s*,\s*)out>)=|out>((]\s*\[|\s*,\s*)in>)=)\]" nextgroup=doxygenParamName skipwhite
syn keyword doxygenParam contained param nextgroup=doxygenParamName,doxygenParamDirection skipwhite
syn match doxygenParamName contained +\$\?[A-Za-z0-9_:]\++ nextgroup=doxygenSpecialMultilineDesc skipwhite
syn keyword doxygenRetval contained retval throw exception page nextgroup=doxygenParamName skipwhite
" Match one line identifiers.
syn keyword doxygenOther contained addindex anchor
\ dontinclude endhtmlonly endlatexonly showinitializer hideinitializer
\ example htmlonly image include ingroup internal latexonly line
\ overload relates relatesalso sa skip skipline
\ until verbinclude version addtogroup htmlinclude copydoc dotfile
\ xmlonly endxmlonly
\ nextgroup=doxygenSpecialOnelineDesc
syn region doxygenCodeRegion contained matchgroup=doxygenOther start=+\<code\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endcode\>+ contains=doxygenCodeRegionSpecial,doxygenContinueComment,doxygenErrorComment,@NoSpell
syn match doxygenCodeRegionSpecial contained +[\\@]\(endcode\>\)\@=+
syn region doxygenVerbatimRegion contained matchgroup=doxygenOther start=+\<verbatim\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endverbatim\>+ contains=doxygenVerbatimRegionSpecial,doxygenContinueComment,doxygenErrorComment,@NoSpell
syn match doxygenVerbatimRegionSpecial contained +[\\@]\(endverbatim\>\)\@=+
if exists('b:current_syntax')
let b:doxygen_syntax_save=b:current_syntax
unlet b:current_syntax
endif
syn include @Dotx syntax/dot.vim
if exists('b:doxygen_syntax_save')
let b:current_syntax=b:doxygen_syntax_save
unlet b:doxygen_syntax_save
else
unlet b:current_syntax
endif
syn region doxygenDotRegion contained matchgroup=doxygenOther start=+\<dot\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<enddot\>+ contains=doxygenDotRegionSpecial,doxygenErrorComment,doxygenContinueComment,@NoSpell,@Dotx
syn match doxygenDotRegionSpecial contained +[\\@]\(enddot\>\)\@=+
" Match single line identifiers.
syn keyword doxygenBOther contained class enum dir file fn mainpage interface
\ namespace struct typedef union var def name
\ nextgroup=doxygenSpecialTypeOnelineDesc
syn keyword doxygenOther contained par nextgroup=doxygenHeaderLine
syn region doxygenHeaderLine start=+.+ end=+^+ contained skipwhite nextgroup=doxygenSpecialMultilineDesc
syn keyword doxygenOther contained arg author date deprecated li return returns see invariant note post pre remarks since test nextgroup=doxygenSpecialMultilineDesc
syn keyword doxygenOtherTODO contained todo attention nextgroup=doxygenSpecialMultilineDesc
syn keyword doxygenOtherWARN contained warning nextgroup=doxygenSpecialMultilineDesc
syn keyword doxygenOtherBUG contained bug nextgroup=doxygenSpecialMultilineDesc
" Handle \link, \endlink, highlighting the link-to and the link text bits separately.
syn region doxygenOtherLink matchgroup=doxygenOther start=+\<link\>+ end=+[\@]\@<=endlink\>+ contained contains=doxygenLinkWord,doxygenContinueComment,doxygenLinkError,doxygenEndlinkSpecial
syn match doxygenEndlinkSpecial contained +[\\@]\zeendlink\>+
syn match doxygenLinkWord "[_a-zA-Z:#()][_a-z0-9A-Z:#()]*\>" contained skipnl nextgroup=doxygenLinkRest,doxygenContinueLinkComment
syn match doxygenLinkRest +[^*@\\]\|\*/\@!\|[@\\]\(endlink\>\)\@!+ contained skipnl nextgroup=doxygenLinkRest,doxygenContinueLinkComment
syn match doxygenContinueLinkComment contained +^\s*\*\=[^/]+me=e-1 nextgroup=doxygenLinkRest
syn match doxygenLinkError "\*/" contained
" #Link hilighting.
syn match doxygenHashLink /\([a-zA-Z_][0-9a-zA-Z_]*\)\?#\(\.[0-9a-zA-Z_]\@=\|[a-zA-Z0-9_]\+\|::\|()\)\+/ contained contains=doxygenHashSpecial
syn match doxygenHashSpecial /#/ contained
syn match doxygenHyperLink /\(\s\|^\s*\*\?\)\@<=\(http\|https\|ftp\):\/\/[-0-9a-zA-Z_?&=+#%/.!':;@~]\+/ contained
" Handle \page. This does not use doxygenBrief.
syn match doxygenPage "[\\@]page\>"me=s+1 contained skipwhite nextgroup=doxygenPagePage
syn keyword doxygenPagePage page contained skipwhite nextgroup=doxygenPageIdent
syn region doxygenPageDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenBody
syn match doxygenPageIdent "\<[a-zA-Z_0-9]\+\>" contained nextgroup=doxygenPageDesc
" Handle section
syn keyword doxygenOther defgroup section subsection subsubsection weakgroup contained skipwhite nextgroup=doxygenSpecialIdent
syn region doxygenSpecialSectionDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenContinueComment
syn match doxygenSpecialIdent "\<[a-zA-Z_0-9]\+\>" contained nextgroup=doxygenSpecialSectionDesc
" Does the one-line description for the one-line type identifiers.
syn region doxygenSpecialTypeOnelineDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend
syn region doxygenSpecialOnelineDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend
" Handle the multiline description for the multiline type identifiers.
" Continue until an 'empty' line (can contain a '*' continuation) or until the
" next whole-line @ command \ command.
syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueComment,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell skipwhite keepend
syn match doxygenSpecialContinueComment contained +^\s*\*/\@!\s*+ nextgroup=doxygenSpecial skipwhite
" Handle special cases 'bold' and 'group'
syn keyword doxygenBold contained bold nextgroup=doxygenSpecialHeading
syn keyword doxygenBriefWord contained brief nextgroup=doxygenBriefLine skipwhite
syn match doxygenSpecialHeading +.\++ contained skipwhite
syn keyword doxygenGroup contained group nextgroup=doxygenGroupName skipwhite
syn keyword doxygenGroupName contained +\k\++ nextgroup=doxygenSpecialOnelineDesc skipwhite
" Handle special symbol identifiers @$, @\, @$ etc
syn match doxygenSymbol contained +[$\\&<>#n]+
" Simplistic handling of formula regions
syn region doxygenFormula contained matchgroup=doxygenFormulaEnds start=+f\$+ end=+[@\\]f\$+ contains=doxygenFormulaSpecial,doxygenFormulaOperator
syn match doxygenFormulaSpecial contained +[@\\]\(f[^$]\|[^f]\)+me=s+1 nextgroup=doxygenFormulaKeyword,doxygenFormulaEscaped
syn match doxygenFormulaEscaped contained "."
syn match doxygenFormulaKeyword contained "[a-z]\+"
syn match doxygenFormulaOperator contained +[_^]+
syn region doxygenFormula contained matchgroup=doxygenFormulaEnds start=+f\[+ end=+[@\\]f]+ contains=doxygenFormulaSpecial,doxygenFormulaOperator,doxygenAtom
syn region doxygenAtom contained transparent matchgroup=doxygenFormulaOperator start=+{+ end=+}+ contains=doxygenAtom,doxygenFormulaSpecial,doxygenFormulaOperator
" Add TODO hilighting.
syn keyword doxygenTODO contained TODO README XXX FIXME
" Supported HTML subset. Not perfect, but okay.
syn case ignore
syn region doxygenHtmlTag contained matchgroup=doxygenHtmlCh start=+\v\</=\ze([biuap]|em|strong|img|br|center|code|dfn|d[ldt]|hr|h[0-3]|li|[ou]l|pre|small|sub|sup|table|tt|var|caption|src|alt|longdesc|name|height|width|usemap|ismap|href|type)>+ skip=+\\<\|\<\k\+=\("[^"]*"\|'[^']*\)+ end=+>+ contains=doxygenHtmlCmd,doxygenContinueComment,doxygenHtmlVar
syn keyword doxygenHtmlCmd contained b i em strong u img a br p center code dfn dl dd dt hr h1 h2 h3 li ol ul pre small sub sup table tt var caption nextgroup=doxygenHtmlVar skipwhite
syn keyword doxygenHtmlVar contained src alt longdesc name height width usemap ismap href type nextgroup=doxygenHtmlEqu skipwhite
syn match doxygenHtmlEqu contained +=+ nextgroup=doxygenHtmlExpr skipwhite
syn match doxygenHtmlExpr contained +"\(\\.\|[^"]\)*"\|'\(\\.\|[^']\)*'+ nextgroup=doxygenHtmlVar skipwhite
syn case match
syn match doxygenHtmlSpecial contained "&\(copy\|quot\|[AEIOUYaeiouy]uml\|[AEIOUYaeiouy]acute\|[AEIOUaeiouy]grave\|[AEIOUaeiouy]circ\|[ANOano]tilde\|szlig\|[Aa]ring\|nbsp\|gt\|lt\|amp\);"
syn cluster doxygenHtmlGroup contains=doxygenHtmlCode,doxygenHtmlBold,doxygenHtmlUnderline,doxygenHtmlItalic,doxygenHtmlSpecial,doxygenHtmlTag,doxygenHtmlLink
syn cluster doxygenHtmlTop contains=@Spell,doxygenHtmlSpecial,doxygenHtmlTag,doxygenContinueComment
" Html Support
syn region doxygenHtmlLink contained start=+<[aA]\>\s*\(\n\s*\*\s*\)\=\(\(name\|href\)=\("[^"]*"\|'[^']*'\)\)\=\s*>+ end=+</[aA]>+me=e-4 contains=@doxygenHtmlTop
hi link doxygenHtmlLink Underlined
syn region doxygenHtmlBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderline,doxygenHtmlBoldItalic,@Spell
syn region doxygenHtmlBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderline,doxygenHtmlBoldItalic,@Spell
syn region doxygenHtmlBoldUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderlineItalic,@Spell
syn region doxygenHtmlBoldItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldItalicUnderline,@Spell
syn region doxygenHtmlBoldItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,doxygenHtmlBoldItalicUnderline,@Spell
syn region doxygenHtmlBoldUnderlineItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,@Spell
syn region doxygenHtmlBoldUnderlineItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,@Spell
syn region doxygenHtmlBoldItalicUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderlineItalic,@Spell
syn region doxygenHtmlUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBold,doxygenHtmlUnderlineItalic,@Spell
syn region doxygenHtmlUnderlineBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBoldItalic,@Spell
syn region doxygenHtmlUnderlineBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBoldItalic,@Spell
syn region doxygenHtmlUnderlineItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,htmUnderlineItalicBold,@Spell
syn region doxygenHtmlUnderlineItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,htmUnderlineItalicBold,@Spell
syn region doxygenHtmlUnderlineItalicBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,@Spell
syn region doxygenHtmlUnderlineItalicBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,@Spell
syn region doxygenHtmlUnderlineBoldItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,@Spell
syn region doxygenHtmlUnderlineBoldItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,@Spell
syn region doxygenHtmlItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicBold,doxygenHtmlItalicUnderline,@Spell
syn region doxygenHtmlItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,@Spell
syn region doxygenHtmlItalicBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicBoldUnderline,@Spell
syn region doxygenHtmlItalicBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlItalicBoldUnderline,@Spell
syn region doxygenHtmlItalicBoldUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,@Spell
syn region doxygenHtmlItalicUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicUnderlineBold,@Spell
syn region doxygenHtmlItalicUnderlineBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,@Spell
syn region doxygenHtmlItalicUnderlineBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,@Spell
syn region doxygenHtmlCode contained start="\c<code\>" end="\c</code>"me=e-7 contains=@doxygenHtmlTop,@NoSpell
" Prevent the doxygen contained matches from leaking into the c/rc groups.
syn cluster cParenGroup add=doxygen.*
syn cluster cParenGroup remove=doxygenComment,doxygenCommentL
syn cluster cPreProcGroup add=doxygen.*
syn cluster cMultiGroup add=doxygen.*
syn cluster rcParenGroup add=doxygen.*
syn cluster rcParenGroup remove=doxygenComment,doxygenCommentL
syn cluster rcGroup add=doxygen.*
let s:my_syncolor=0
if !exists(':SynColor')
command -nargs=+ SynColor hi def <args>
let s:my_syncolor=1
endif
let s:my_synlink=0
if !exists(':SynLink')
command -nargs=+ SynLink hi def link <args>
let s:my_synlink=1
endif
try
"let did_doxygen_syntax_inits = &background
hi doxygen_Dummy guifg=black
fun! s:Doxygen_Hilights_Base()
SynLink doxygenHtmlSpecial Special
SynLink doxygenHtmlVar Type
SynLink doxygenHtmlExpr String
SynLink doxygenSmallSpecial SpecialChar
SynLink doxygenSpecialCodeWord doxygenSmallSpecial
SynLink doxygenSpecialBoldWord doxygenSmallSpecial
SynLink doxygenSpecialEmphasisedWord doxygenSmallSpecial
SynLink doxygenSpecialArgumentWord doxygenSmallSpecial
" SynColor doxygenFormulaKeyword cterm=bold ctermfg=DarkMagenta guifg=DarkMagenta gui=bold
SynLink doxygenFormulaKeyword Keyword
"SynColor doxygenFormulaEscaped ctermfg=DarkMagenta guifg=DarkMagenta gui=bold
SynLink doxygenFormulaEscaped Special
SynLink doxygenFormulaOperator Operator
SynLink doxygenFormula Statement
SynLink doxygenSymbol Constant
SynLink doxygenSpecial Special
SynLink doxygenFormulaSpecial Special
"SynColor doxygenFormulaSpecial ctermfg=DarkBlue guifg=DarkBlue
endfun
call s:Doxygen_Hilights_Base()
fun! s:Doxygen_Hilights()
" Pick a sensible default for 'codeword'.
let font=''
if exists('g:doxygen_codeword_font')
if g:doxygen_codeword_font !~ '\<\k\+='
let font='font='.g:doxygen_codeword_font
else
let font=g:doxygen_codeword_font
endif
else
" Try and pick a font (only some platforms have been tested).
if has('gui_running')
if has('gui_gtk2')
if &guifont == ''
let font="font='FreeSerif 12'"
else
let font="font='".substitute(&guifont, '^.\{-}\([0-9]\+\)$', 'FreeSerif \1','')."'"
endif
elseif has('gui_win32') || has('gui_win16') || has('gui_win95')
if exists('g:doxygen_use_bitsream_vera') && g:doxygen_use_bitsream_vera
let font_base='Bitstream_Vera_Sans_Mono'
else
let font_base='Lucida_Console'
endif
if &guifont == ''
let font='font='.font_base.':h10'
else
let font='font='.matchstr(substitute(&guifont, '^[^:]*', font_base,''),'[^,]*')
endif
elseif has('gui_athena') || has('gui_gtk') || &guifont=~'^\(-[^-]\+\)\{14}'
if &guifont == ''
let font='font=-b&h-lucidatypewriter-medium-r-normal-*-*-140-*-*-m-*-iso8859-1'
else
" let font='font='.substitute(&guifont,'^\(-[^-]\+\)\{7}-\([0-9]\+\).*', '-b\&h-lucidatypewriter-medium-r-normal-*-*-\2-*-*-m-*-iso8859-1','')
" The above line works, but it is hard to expect the combination of
" the two fonts will look good.
endif
elseif has('gui_kde')
" let font='font=Bitstream\ Vera\ Sans\ Mono/12/-1/5/50/0/0/0/0/0'
endif
endif
endif
if font=='' | let font='gui=bold' | endif
exe 'SynColor doxygenCodeWord term=bold cterm=bold '.font
if (exists('g:doxygen_enhanced_color') && g:doxygen_enhanced_color) || (exists('g:doxygen_enhanced_colour') && g:doxygen_enhanced_colour)
if &background=='light'
SynColor doxygenComment ctermfg=DarkRed guifg=DarkRed
SynColor doxygenBrief cterm=bold ctermfg=Cyan guifg=DarkBlue gui=bold
SynColor doxygenBody ctermfg=DarkBlue guifg=DarkBlue
SynColor doxygenSpecialTypeOnelineDesc cterm=bold ctermfg=DarkRed guifg=firebrick3 gui=bold
SynColor doxygenBOther cterm=bold ctermfg=DarkMagenta guifg=#aa50aa gui=bold
SynColor doxygenParam ctermfg=DarkGray guifg=#aa50aa
SynColor doxygenParamName cterm=italic ctermfg=DarkBlue guifg=DeepSkyBlue4 gui=italic,bold
SynColor doxygenSpecialOnelineDesc cterm=bold ctermfg=DarkCyan guifg=DodgerBlue3 gui=bold
SynColor doxygenSpecialHeading cterm=bold ctermfg=DarkBlue guifg=DeepSkyBlue4 gui=bold
SynColor doxygenPrev ctermfg=DarkGreen guifg=DarkGreen
else
SynColor doxygenComment ctermfg=LightRed guifg=LightRed
SynColor doxygenBrief cterm=bold ctermfg=Cyan ctermbg=darkgrey guifg=LightBlue gui=Bold,Italic
SynColor doxygenBody ctermfg=Cyan guifg=LightBlue
SynColor doxygenSpecialTypeOnelineDesc cterm=bold ctermfg=Red guifg=firebrick3 gui=bold
SynColor doxygenBOther cterm=bold ctermfg=Magenta guifg=#aa50aa gui=bold
SynColor doxygenParam ctermfg=LightGray guifg=LightGray
SynColor doxygenParamName cterm=italic ctermfg=LightBlue guifg=LightBlue gui=italic,bold
SynColor doxygenSpecialOnelineDesc cterm=bold ctermfg=LightCyan guifg=LightCyan gui=bold
SynColor doxygenSpecialHeading cterm=bold ctermfg=LightBlue guifg=LightBlue gui=bold
SynColor doxygenPrev ctermfg=LightGreen guifg=LightGreen
endif
else
SynLink doxygenComment SpecialComment
SynLink doxygenBrief Statement
SynLink doxygenBody Comment
SynLink doxygenSpecialTypeOnelineDesc Statement
SynLink doxygenBOther Constant
SynLink doxygenParam Function
SynLink doxygenParamName Define
SynLink doxygenSpecialOnelineDesc Statement
SynLink doxygenSpecialHeading Statement
SynLink doxygenPrev SpecialComment
endif
endfun
call s:Doxygen_Hilights()
" This is still a proposal, but won't do any harm.
aug doxygengroup
au!
au Syntax UserColor_reset nested call s:Doxygen_Hilights_Base()
au Syntax UserColor_{on,reset,enable} nested call s:Doxygen_Hilights()
aug END
SynLink doxygenBody Comment
SynLink doxygenLine doxygenBody
SynLink doxygenTODO Todo
SynLink doxygenOtherTODO Todo
SynLink doxygenOtherWARN Todo
SynLink doxygenOtherBUG Todo
SynLink doxygenErrorSpecial Error
SynLink doxygenErrorEnd Error
SynLink doxygenErrorComment Error
SynLink doxygenLinkError Error
SynLink doxygenBriefSpecial doxygenSpecial
SynLink doxygenHashSpecial doxygenSpecial
SynLink doxygenGroupDefineSpecial doxygenSpecial
SynLink doxygenEndlinkSpecial doxygenSpecial
SynLink doxygenCodeRegionSpecial doxygenSpecial
SynLink doxygenVerbatimRegionSpecial doxygenSpecial
SynLink doxygenDotRegionSpecial doxygenSpecial
SynLink doxygenGroupDefine doxygenParam
SynLink doxygenSpecialMultilineDesc doxygenSpecialOnelineDesc
SynLink doxygenFormulaEnds doxygenSpecial
SynLink doxygenBold doxygenParam
SynLink doxygenBriefWord doxygenParam
SynLink doxygenRetval doxygenParam
SynLink doxygenOther doxygenParam
SynLink doxygenStart doxygenComment
SynLink doxygenStart2 doxygenStart
SynLink doxygenComment2 doxygenComment
SynLink doxygenCommentL doxygenComment
SynLink doxygenContinueComment doxygenComment
SynLink doxygenSpecialContinueComment doxygenComment
SynLink doxygenSkipComment doxygenComment
SynLink doxygenEndComment doxygenComment
SynLink doxygenStartL doxygenComment
SynLink doxygenBriefEndComment doxygenComment
SynLink doxygenPrevL doxygenPrev
SynLink doxygenBriefL doxygenBrief
SynLink doxygenBriefLine doxygenBrief
SynLink doxygenHeaderLine doxygenSpecialHeading
SynLink doxygenStartSkip doxygenContinueComment
SynLink doxygenLinkWord doxygenParamName
SynLink doxygenLinkRest doxygenSpecialMultilineDesc
SynLink doxygenHyperLink doxygenLinkWord
SynLink doxygenHashLink doxygenLinkWord
SynLink doxygenPage doxygenSpecial
SynLink doxygenPagePage doxygenBOther
SynLink doxygenPageIdent doxygenParamName
SynLink doxygenPageDesc doxygenSpecialTypeOnelineDesc
SynLink doxygenSpecialIdent doxygenPageIdent
SynLink doxygenSpecialSectionDesc doxygenSpecialMultilineDesc
SynLink doxygenSpecialRefWord doxygenOther
SynLink doxygenRefWord doxygenPageIdent
SynLink doxygenContinueLinkComment doxygenComment
SynLink doxygenHtmlCh Function
SynLink doxygenHtmlCmd Statement
SynLink doxygenHtmlBoldItalicUnderline doxygenHtmlBoldUnderlineItalic
SynLink doxygenHtmlUnderlineBold doxygenHtmlBoldUnderline
SynLink doxygenHtmlUnderlineItalicBold doxygenHtmlBoldUnderlineItalic
SynLink doxygenHtmlUnderlineBoldItalic doxygenHtmlBoldUnderlineItalic
SynLink doxygenHtmlItalicUnderline doxygenHtmlUnderlineItalic
SynLink doxygenHtmlItalicBold doxygenHtmlBoldItalic
SynLink doxygenHtmlItalicBoldUnderline doxygenHtmlBoldUnderlineItalic
SynLink doxygenHtmlItalicUnderlineBold doxygenHtmlBoldUnderlineItalic
SynLink doxygenHtmlLink Underlined
SynLink doxygenParamDirection StorageClass
if !exists("doxygen_my_rendering") && !exists("html_my_rendering")
SynColor doxygenBoldWord term=bold cterm=bold gui=bold
SynColor doxygenEmphasisedWord term=italic cterm=italic gui=italic
SynLink doxygenArgumentWord doxygenEmphasisedWord
SynLink doxygenHtmlCode doxygenCodeWord
SynLink doxygenHtmlBold doxygenBoldWord
SynColor doxygenHtmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
SynColor doxygenHtmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
SynColor doxygenHtmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
SynColor doxygenHtmlUnderline term=underline cterm=underline gui=underline
SynColor doxygenHtmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
SynColor doxygenHtmlItalic term=italic cterm=italic gui=italic
endif
finally
if s:my_synlink | delcommand SynLink | endif
if s:my_syncolor | delcommand SynColor | endif
endtry
if &syntax=='idl'
syn cluster idlCommentable add=doxygenComment,doxygenCommentL
endif
"syn sync clear
"syn sync maxlines=500
"syn sync minlines=50
syn sync match doxygenComment groupthere cComment "/\@<!/\*"
syn sync match doxygenSyncComment grouphere doxygenComment "/\@<!/\*[*!]"
"syn sync match doxygenSyncComment grouphere doxygenComment "/\*[*!]" contains=doxygenStart,doxygenTODO keepend
syn sync match doxygenSyncEndComment groupthere NONE "\*/"
if !exists('b:current_syntax')
let b:current_syntax = "doxygen"
else
let b:current_syntax = b:current_syntax.'.doxygen'
endif
finally
let &cpo = s:cpo_save
unlet s:cpo_save
endtry
" vim:et sw=2 sts=2

@ -0,0 +1,181 @@
" Vim syntax file
" Language: DTD (Document Type Definition for XML)
" Maintainer: Johannes Zellner <johannes@zellner.org>
" Author and previous maintainer:
" Daniel Amyot <damyot@site.uottawa.ca>
" Last Change: Tue, 27 Apr 2004 14:54:59 CEST
" Filenames: *.dtd
"
" REFERENCES:
" http://www.w3.org/TR/html40/
" http://www.w3.org/TR/NOTE-html-970421
"
" TODO:
" - improve synchronizing.
if version < 600
syntax clear
let __dtd_cpo_save__ = &cpo
set cpo&
else
if exists("b:current_syntax")
finish
endif
let s:dtd_cpo_save = &cpo
set cpo&vim
endif
if !exists("dtd_ignore_case")
" I prefer having the case takes into consideration.
syn case match
else
syn case ignore
endif
" the following line makes the opening <! and
" closing > highlighted using 'dtdFunction'.
"
" PROVIDES: @dtdTagHook
"
syn region dtdTag matchgroup=dtdFunction
\ start=+<!+ end=+>+ matchgroup=NONE
\ contains=dtdTag,dtdTagName,dtdError,dtdComment,dtdString,dtdAttrType,dtdAttrDef,dtdEnum,dtdParamEntityInst,dtdParamEntityDecl,dtdCard,@dtdTagHook
if !exists("dtd_no_tag_errors")
" mark everything as an error which starts with a <!
" and is not overridden later. If this is annoying,
" it can be switched off by setting the variable
" dtd_no_tag_errors.
syn region dtdError contained start=+<!+lc=2 end=+>+
endif
" if this is a html like comment hightlight also
" the opening <! and the closing > as Comment.
syn region dtdComment start=+<![ \t]*--+ end=+-->+ contains=dtdTodo,@Spell
" proper DTD comment
syn region dtdComment contained start=+--+ end=+--+ contains=dtdTodo,@Spell
" Start tags (keywords). This is contained in dtdFunction.
" Note that everything not contained here will be marked
" as error.
syn match dtdTagName contained +<!\(ATTLIST\|DOCTYPE\|ELEMENT\|ENTITY\|NOTATION\|SHORTREF\|USEMAP\|\[\)+lc=2,hs=s+2
" wildcards and operators
syn match dtdCard contained "|"
syn match dtdCard contained ","
" evenutally overridden by dtdEntity
syn match dtdCard contained "&"
syn match dtdCard contained "?"
syn match dtdCard contained "\*"
syn match dtdCard contained "+"
" ...and finally, special cases.
syn match dtdCard "ANY"
syn match dtdCard "EMPTY"
if !exists("dtd_no_param_entities")
" highlight parameter entity declarations
" and instances. Note that the closing `;'
" is optional.
" instances
syn region dtdParamEntityInst oneline matchgroup=dtdParamEntityPunct
\ start="%[-_a-zA-Z0-9.]\+"he=s+1,rs=s+1
\ skip=+[-_a-zA-Z0-9.]+
\ end=";\|\>"
\ matchgroup=NONE contains=dtdParamEntityPunct
syn match dtdParamEntityPunct contained "\."
" declarations
" syn region dtdParamEntityDecl oneline matchgroup=dtdParamEntityDPunct start=+<!ENTITY % +lc=8 skip=+[-_a-zA-Z0-9.]+ matchgroup=NONE end="\>" contains=dtdParamEntityDPunct
syn match dtdParamEntityDecl +<!ENTITY % [-_a-zA-Z0-9.]*+lc=8 contains=dtdParamEntityDPunct
syn match dtdParamEntityDPunct contained "%\|\."
endif
" &entities; compare with xml
syn match dtdEntity "&[^; \t]*;" contains=dtdEntityPunct
syn match dtdEntityPunct contained "[&.;]"
" Strings are between quotes
syn region dtdString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=dtdAttrDef,dtdAttrType,dtdEnum,dtdParamEntityInst,dtdEntity,dtdCard
syn region dtdString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=dtdAttrDef,dtdAttrType,dtdEnum,dtdParamEntityInst,dtdEntity,dtdCard
" Enumeration of elements or data between parenthesis
"
" PROVIDES: @dtdEnumHook
"
syn region dtdEnum matchgroup=dtdType start="(" end=")" matchgroup=NONE contains=dtdEnum,dtdParamEntityInst,dtdCard,@dtdEnumHook
"Attribute types
syn keyword dtdAttrType NMTOKEN ENTITIES NMTOKENS ID CDATA
syn keyword dtdAttrType IDREF IDREFS
" ENTITY has to treated special for not overriding <!ENTITY
syn match dtdAttrType +[^!]\<ENTITY+
"Attribute Definitions
syn match dtdAttrDef "#REQUIRED"
syn match dtdAttrDef "#IMPLIED"
syn match dtdAttrDef "#FIXED"
syn case match
" define some common keywords to mark TODO
" and important sections inside comments.
syn keyword dtdTodo contained TODO FIXME XXX
syn sync lines=250
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_dtd_syn_inits")
if version < 508
let did_dtd_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" The default highlighting.
HiLink dtdFunction Function
HiLink dtdTag Normal
HiLink dtdType Type
HiLink dtdAttrType dtdType
HiLink dtdAttrDef dtdType
HiLink dtdConstant Constant
HiLink dtdString dtdConstant
HiLink dtdEnum dtdConstant
HiLink dtdCard dtdFunction
HiLink dtdEntity Statement
HiLink dtdEntityPunct dtdType
HiLink dtdParamEntityInst dtdConstant
HiLink dtdParamEntityPunct dtdType
HiLink dtdParamEntityDecl dtdType
HiLink dtdParamEntityDPunct dtdComment
HiLink dtdComment Comment
HiLink dtdTagName Statement
HiLink dtdError Error
HiLink dtdTodo Todo
delcommand HiLink
endif
if version < 600
let &cpo = __dtd_cpo_save__
unlet __dtd_cpo_save__
else
let &cpo = s:dtd_cpo_save
unlet s:dtd_cpo_save
endif
let b:current_syntax = "dtd"
" vim: ts=8

@ -0,0 +1,346 @@
" Vim syntax file
" Language: XML
" Maintainer: Johannes Zellner <johannes@zellner.org>
" Author and previous maintainer:
" Paul Siegmann <pauls@euronet.nl>
" Last Change: 2009-07-13 21:26:55
" Filenames: *.xml
" $Id: xml.vim,v 1.3 2006/04/11 21:32:00 vimboss Exp $
" CONFIGURATION:
" syntax folding can be turned on by
"
" let g:xml_syntax_folding = 1
"
" before the syntax file gets loaded (e.g. in ~/.vimrc).
" This might slow down syntax highlighting significantly,
" especially for large files.
"
" CREDITS:
" The original version was derived by Paul Siegmann from
" Claudio Fleiner's html.vim.
"
" REFERENCES:
" [1] http://www.w3.org/TR/2000/REC-xml-20001006
" [2] http://www.w3.org/XML/1998/06/xmlspec-report-19980910.htm
"
" as <hirauchi@kiwi.ne.jp> pointed out according to reference [1]
"
" 2.3 Common Syntactic Constructs
" [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
" [5] Name ::= (Letter | '_' | ':') (NameChar)*
"
" NOTE:
" 1) empty tag delimiters "/>" inside attribute values (strings)
" confuse syntax highlighting.
" 2) for large files, folding can be pretty slow, especially when
" loading a file the first time and viewoptions contains 'folds'
" so that folds of previous sessions are applied.
" Don't use 'foldmethod=syntax' in this case.
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
let s:xml_cpo_save = &cpo
set cpo&vim
syn case match
" mark illegal characters
syn match xmlError "[<&]"
" strings (inside tags) aka VALUES
"
" EXAMPLE:
"
" <tag foo.attribute = "value">
" ^^^^^^^
syn region xmlString contained start=+"+ end=+"+ contains=xmlEntity,@Spell display
syn region xmlString contained start=+'+ end=+'+ contains=xmlEntity,@Spell display
" punctuation (within attributes) e.g. <tag xml:foo.attribute ...>
" ^ ^
" syn match xmlAttribPunct +[-:._]+ contained display
syn match xmlAttribPunct +[:.]+ contained display
" no highlighting for xmlEqual (xmlEqual has no highlighting group)
syn match xmlEqual +=+ display
" attribute, everything before the '='
"
" PROVIDES: @xmlAttribHook
"
" EXAMPLE:
"
" <tag foo.attribute = "value">
" ^^^^^^^^^^^^^
"
syn match xmlAttrib
\ +[-'"<]\@<!\<[a-zA-Z:_][-.0-9a-zA-Z0-9:_]*\>\(['">]\@!\|$\)+
\ contained
\ contains=xmlAttribPunct,@xmlAttribHook
\ display
" namespace spec
"
" PROVIDES: @xmlNamespaceHook
"
" EXAMPLE:
"
" <xsl:for-each select = "lola">
" ^^^
"
if exists("g:xml_namespace_transparent")
syn match xmlNamespace
\ +\(<\|</\)\@<=[^ /!?<>"':]\+[:]\@=+
\ contained
\ contains=@xmlNamespaceHook
\ transparent
\ display
else
syn match xmlNamespace
\ +\(<\|</\)\@<=[^ /!?<>"':]\+[:]\@=+
\ contained
\ contains=@xmlNamespaceHook
\ display
endif
" tag name
"
" PROVIDES: @xmlTagHook
"
" EXAMPLE:
"
" <tag foo.attribute = "value">
" ^^^
"
syn match xmlTagName
\ +[<]\@<=[^ /!?<>"']\++
\ contained
\ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook
\ display
if exists('g:xml_syntax_folding')
" start tag
" use matchgroup=xmlTag to skip over the leading '<'
"
" PROVIDES: @xmlStartTagHook
"
" EXAMPLE:
"
" <tag id="whoops">
" s^^^^^^^^^^^^^^^e
"
syn region xmlTag
\ matchgroup=xmlTag start=+<[^ /!?<>"']\@=+
\ matchgroup=xmlTag end=+>+
\ contained
\ contains=xmlError,xmlTagName,xmlAttrib,xmlEqual,xmlString,@xmlStartTagHook
" highlight the end tag
"
" PROVIDES: @xmlTagHook
" (should we provide a separate @xmlEndTagHook ?)
"
" EXAMPLE:
"
" </tag>
" ^^^^^^
"
syn match xmlEndTag
\ +</[^ /!?<>"']\+>+
\ contained
\ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook
" tag elements with syntax-folding.
" NOTE: NO HIGHLIGHTING -- highlighting is done by contained elements
"
" PROVIDES: @xmlRegionHook
"
" EXAMPLE:
"
" <tag id="whoops">
" <!-- comment -->
" <another.tag></another.tag>
" <empty.tag/>
" some data
" </tag>
"
syn region xmlRegion
\ start=+<\z([^ /!?<>"']\+\)+
\ skip=+<!--\_.\{-}-->+
\ end=+</\z1\_\s\{-}>+
\ matchgroup=xmlEndTag end=+/>+
\ fold
\ contains=xmlTag,xmlEndTag,xmlCdata,xmlRegion,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook,@Spell
\ keepend
\ extend
else
" no syntax folding:
" - contained attribute removed
" - xmlRegion not defined
"
syn region xmlTag
\ matchgroup=xmlTag start=+<[^ /!?<>"']\@=+
\ matchgroup=xmlTag end=+>+
\ contains=xmlError,xmlTagName,xmlAttrib,xmlEqual,xmlString,@xmlStartTagHook
syn match xmlEndTag
\ +</[^ /!?<>"']\+>+
\ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook
endif
" &entities; compare with dtd
syn match xmlEntity "&[^; \t]*;" contains=xmlEntityPunct
syn match xmlEntityPunct contained "[&.;]"
if exists('g:xml_syntax_folding')
" The real comments (this implements the comments as defined by xml,
" but not all xml pages actually conform to it. Errors are flagged.
syn region xmlComment
\ start=+<!+
\ end=+>+
\ contains=xmlCommentStart,xmlCommentError
\ extend
\ fold
else
" no syntax folding:
" - fold attribute removed
"
syn region xmlComment
\ start=+<!+
\ end=+>+
\ contains=xmlCommentStart,xmlCommentError
\ extend
endif
syn match xmlCommentStart contained "<!" nextgroup=xmlCommentPart
syn keyword xmlTodo contained TODO FIXME XXX
syn match xmlCommentError contained "[^><!]"
syn region xmlCommentPart
\ start=+--+
\ end=+--+
\ contained
\ contains=xmlTodo,@xmlCommentHook,@Spell
" CData sections
"
" PROVIDES: @xmlCdataHook
"
syn region xmlCdata
\ start=+<!\[CDATA\[+
\ end=+]]>+
\ contains=xmlCdataStart,xmlCdataEnd,@xmlCdataHook,@Spell
\ keepend
\ extend
" using the following line instead leads to corrupt folding at CDATA regions
" syn match xmlCdata +<!\[CDATA\[\_.\{-}]]>+ contains=xmlCdataStart,xmlCdataEnd,@xmlCdataHook
syn match xmlCdataStart +<!\[CDATA\[+ contained contains=xmlCdataCdata
syn keyword xmlCdataCdata CDATA contained
syn match xmlCdataEnd +]]>+ contained
" Processing instructions
" This allows "?>" inside strings -- good idea?
syn region xmlProcessing matchgroup=xmlProcessingDelim start="<?" end="?>" contains=xmlAttrib,xmlEqual,xmlString
if exists('g:xml_syntax_folding')
" DTD -- we use dtd.vim here
syn region xmlDocType matchgroup=xmlDocTypeDecl
\ start="<!DOCTYPE"he=s+2,rs=s+2 end=">"
\ fold
\ contains=xmlDocTypeKeyword,xmlInlineDTD,xmlString
else
" no syntax folding:
" - fold attribute removed
"
syn region xmlDocType matchgroup=xmlDocTypeDecl
\ start="<!DOCTYPE"he=s+2,rs=s+2 end=">"
\ contains=xmlDocTypeKeyword,xmlInlineDTD,xmlString
endif
syn keyword xmlDocTypeKeyword contained DOCTYPE PUBLIC SYSTEM
syn region xmlInlineDTD contained matchgroup=xmlDocTypeDecl start="\[" end="]" contains=@xmlDTD
syn include @xmlDTD <sfile>:p:h/dtd.vim
unlet b:current_syntax
" synchronizing
" TODO !!! to be improved !!!
syn sync match xmlSyncDT grouphere xmlDocType +\_.\(<!DOCTYPE\)\@=+
" syn sync match xmlSyncDT groupthere NONE +]>+
if exists('g:xml_syntax_folding')
syn sync match xmlSync grouphere xmlRegion +\_.\(<[^ /!?<>"']\+\)\@=+
" syn sync match xmlSync grouphere xmlRegion "<[^ /!?<>"']*>"
syn sync match xmlSync groupthere xmlRegion +</[^ /!?<>"']\+>+
endif
syn sync minlines=100
" The default highlighting.
hi def link xmlTodo Todo
hi def link xmlTag Identifier
hi def link xmlTagName Function
hi def link xmlEndTag Identifier
if !exists("g:xml_namespace_transparent")
hi def link xmlNamespace Tag
endif
hi def link xmlEntity Statement
hi def link xmlEntityPunct Type
hi def link xmlAttribPunct Comment
hi def link xmlAttrib Type
hi def link xmlString String
hi def link xmlComment Comment
hi def link xmlCommentStart xmlComment
hi def link xmlCommentPart Comment
hi def link xmlCommentError Error
hi def link xmlError Error
hi def link xmlProcessingDelim Comment
hi def link xmlProcessing Type
hi def link xmlCdata String
hi def link xmlCdataCdata Statement
hi def link xmlCdataStart Type
hi def link xmlCdataEnd Type
hi def link xmlDocTypeDecl Function
hi def link xmlDocTypeKeyword Statement
hi def link xmlInlineDTD Function
let b:current_syntax = "xml"
let &cpo = s:xml_cpo_save
unlet s:xml_cpo_save
" vim: ts=8

@ -0,0 +1,278 @@
"=====================================================================
" Utilisation de "pathogene"
"=====================================================================
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
"=====================================================================
" Configuration globale
"=====================================================================
set nocompatible " Pas de compatibilité avec vi
set encoding=utf-8 " Encodage par défaut
set tabstop=8 " Tabulation de 8 caractères
set shiftwidth=8 " Idem
set noexpandtab " Utilise le caractère tabulation, pas des espaces
set nostartofline " Conserve le caractère sur la même colonne quand on change de ligne
set autoindent " Indentation automatique
set smartindent " Idem
set showcmd " Montre la commande en cours
set ignorecase " Pas de casse pour les recherches
set title " Affiche le nom et l'état du fichier dans le titre
set nonumber " Cache les numéro de ligne
set laststatus=2 " Barre de status toujours visible
set backspace=indent,eol,start " Autorise le caractère backspace
set ruler " Indique la position dans le fichier
set showmatch " Vérification présence (, {, [ lorsqu'on tappe le caractère fermant
set wildmenu " Affiche la liste des commandes vim lors d'un appuis sur <tab> (ex: set hl <tab>)
set scrolloff=5 " Garde toujours 5 lignes visibles autour du curseur
set viewdir=~/.vim/saveview/ " Répertoire de sauvegarde des vues (replis manuels)
set foldcolumn=2 " Repère visuel pour les replis
set incsearch " Recherche incrémentale
set nohlsearch " Ne colorie pas les recherches
set fileformats=unix,mac,dos " Formats de fin de ligne
set nolist " Pas de caratères non-imprimables
set listchars=eol,tab:\|\ ,trail:~ " Paramétrage des caractères non-imprimables
filetype plugin indent on " Détection automatique dutype de fichier + plugin + indentation
autocmd BufWinLeave *.* mkview
autocmd BufWinEnter *.* silent loadview
syntax enable " Active la syntaxe
set foldmethod=syntax " Replis basé sur la syntaxe
set nocursorline
colorscheme molokai-perso
set cursorline
"=====================================================================
" Configurations plugins
"=====================================================================
" tagbar
let g:tagbar_ctags_bin = '/usr/bin/ctags'
let g:tagbar_autofocus = 1
let g:tagbar_autoclose = 1
" supertab
let g:SuperTabDefaultCompletionType = "context"
let g:SuperTabRetainCompletionDuretaion = "completion"
let g:SuperTabClosePreviewOnPopupClose = 1
let g:SuperTabNoCompleteAfter = ['^', '\s', "'", '=>']
" syntastic
let g:syntastic_check_on_open = 0
let g:syntastic_loc_list_height = 5
let g:syntastic_stl_format = '[%E{%e error(s)}%B{, }%W{%w warning(s)}]'
let g:syntastic_mode_map = { 'mode': 'active',
\ 'active_filetypes': ['php'],
\ 'passive_filetypes': ['html', 'css'] }
" vim-bufferline
let g:bufferline_fname_mod = ':p:.'
" vim-airline
let g:airline_powerline_fonts = 1
let g:airline_section_z = '%3p%%%4l:%L%3c'
let g:airline#extensions#whitespace#enabled = 0 " pas de détections des espaces (lignes vides ?)
let g:airline#extensions#bufferline#enabled = 1
let g:airline#extensions#syntastic#enabled = 1
let g:airline#extensions#branch#enabled = 1
let g:airline#extensions#tagbar#enabled = 1
"=====================================================================
" Configuration par type de fichier
"=====================================================================
" Config générale
autocmd BufEnter * set tabstop=8
autocmd BufEnter * set shiftwidth=8
autocmd BufEnter * set noexpandtab
" PHP
let php_sql_query = 1
let php_smart_members = 1
let php_alt_properties = 1
let php_alt_arrays = 2
let php_folding = 1
let php_special_functions = 0
let php_nested_functions = 1
" Doxygen
autocmd BufEnter *.doc set filetype=doxygen
let g:doxygen_javadoc_autobrief = 0
" Twig
autocmd BufEnter *.twig set filetype=htmljinja
" MySQL
autocmd BufEnter *.mysql.sql set filetype=sqlmysql
" YML : tabulation de 4, avec expansion en espaces
autocmd BufEnter *.yml set tabstop=4
autocmd BufEnter *.yml set shiftwidth=4
autocmd BufEnter *.yml set expandtab
"=====================================================================
" Replacer le curseur à la dernière édition
"=====================================================================
set viminfo='10,\"100,:20,%,n~/.viminfo
autocmd BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe "norm '\""|else|exe "norm $"|endif|endif
"=====================================================================
" Omni-Completion
"=====================================================================
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType htmljinja set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType c set omnifunc=ccomplete#Complete
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType sql set omnifunc=sqlcomplete#Complete
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
"=====================================================================
" Gestion dictionnaire
"=====================================================================
if has("spell")
setlocal spell spelllang=
map ,lf :setlocal spell spelllang=fr<CR>
map ,le :setlocal spell spelllang=en<CR>
endif
set dictionary+=/usr/share/dict/french
set spellsuggest=5
autocmd BufEnter *.tex set spell
autocmd BufEnter *.tex set spelllang=fr
"=====================================================================
" Personnalisation barre de status
"=====================================================================
set statusline=%f%m%r%h%w\ \ \ \ \ [%{&fileencoding}]\ \ \ \ [%{&fileformat}]\ \ \ \ [%Y]\ \ \ \ [%l,\ %c-%v]\ \ \ \ [%p%%]\ \ \ \ [%L\ lignes]\ \ \ \ %{SyntasticStatuslineFlag()}
"=====================================================================
" Modification de l'affichage des replis
"=====================================================================
function! MyFoldFunction()
let line = getline(v:foldstart)
"Cleanup unwanted things in first line
let sub = substitute(line, '/\*\|\*/\|^\s+', '', 'g')
"Calculate lines in folded text
let lines = v:foldend - v:foldstart + 1
return v:folddashes.sub.' {...'.lines.' lignes...}'
endfunction
set foldtext=MyFoldFunction()
"=====================================================================
" Poser une marque visible avec F7
"=====================================================================
hi Mark guibg=indianred guifg=white gui=bold cterm=bold ctermfg=7 ctermbg=1
sign define mark text=!> texthl=Mark
map <F7> :exe 'sign place 001 name=mark line='.line(".").' buffer='.winbufnr(0)<CR>
map <S-F7> :sign unplace<CR>
"=====================================================================
" Fonctions
"=====================================================================
function A_askFile(text) abort
call inputsave()
let g:Filename = input(a:text, "", "file")
call inputrestore()
endfunction
"=====================================================================
" Raccourcis
"=====================================================================
" Déplacement ligne vers le haut / bas
:nnoremap <silent> <C-Down> ddp
:nnoremap <silent> <C-Up> ddkP
:inoremap <silent> <C-Down> <Esc>ddpi
:inoremap <silent> <C-Up> <Esc>ddkPi
:vnoremap <silent> <C-Down> dp
:vnoremap <silent> <C-Up> dkP
" (dé)Pliage de code
:nmap <silent> <C-Left> zc
:nmap <silent> <C-Right> zo
:nmap <silent> <C-S-Left> :%foldc!<CR>
:imap <silent> <C-Left> <Esc>zcki
:imap <silent> <C-Right> <Esc>zoi
:imap <silent> <C-S-Left> <Esc>:%foldc!<CR>i
:vmap <silent> <C-Left> zcgv
:vmap <silent> <C-Right> zogv
:vmap <silent> <C-S-Left> :foldc!<CR>gv
" (dé)Commenter
:nmap <silent> <F12> <Leader>c<space>
:imap <silent> <F12> <Esc><Leader>c<space>i
:vmap <silent> <F12> <Leader>c<space>gv
:nmap <silent> <S-F12> <Leader>cs
:imap <silent> <S-F12> <Leader>cs
:vmap <silent> <S-F12> <Leader>csgv
" Gestion d'onglet
:nmap <silent> <M-Left> gT
:nmap <silent> <M-Right> gt
:nmap <silent>  :call A_askFile("File to open : ")<CR>:exec ":tabnew ". Filename<CR>
:imap <silent> <M-Left> <Esc>gTi
:imap <silent> <M-Right> <Esc>gti
:vmap <silent> <M-Left> gT
:vmap <silent> <M-Right> gt
" (dé)Indentation
:nmap <silent> <Tab> >>
:nmap <silent> <S-Tab> <<
:imap <silent> <S-Tab> <Esc><<i
:vmap <silent> <Tab> >gv
:vmap <silent> <S-Tab> <gv
" Autocomplétion
:imap <silent> <F2> 
:imap <silent> <F3> 
:imap <silent> <F4> 
" Opérations standard
":nmap <C-x> "+x
":nmap <C-c> "+c
":nmap <C-v> "+gP
:nmap <C-a> ggVG
" NERD Tree : Arbre de navigation
:nmap <silent> <F9> :NERDTreeToggle<CR>
" Liste de tags
:nmap <silent> <F8> :TagbarToggle<CR>
" Syntastic
:nmap <silent> <F6> :SyntasticCheck<CR>:Errors<CR>
:nmap <silent> <S-F6> :SyntasticReset<CR>:SyntasticCheck<CR>
:nmap <silent> <C-F6> :SyntasticCheck<CR>
" Autres
:nmap <silent> <C-F5> :w<CR>:e<CR>
Loading…
Cancel
Save