Cleaning + php complete (not finished)

This commit is contained in:
Simon Vieille 2016-10-27 23:57:40 +02:00
parent 65ebd36472
commit f736482db3
3 changed files with 155 additions and 5486 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,214 +0,0 @@
"=============================================================================
" File: zencoding.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
" Last Change: 22-Nov-2011.
" Version: 0.58
" WebPage: http://github.com/mattn/zencoding-vim
" Description: vim plugins for HTML and CSS hi-speed coding.
" SeeAlso: http://code.google.com/p/zen-coding/
" Usage:
"
" This is vim script support expanding abbreviation like zen-coding.
" ref: http://code.google.com/p/zen-coding/
"
" Type abbreviation
" +-------------------------------------
" | html:5_
" +-------------------------------------
" "_" is a cursor position. and type "<c-y>," (Ctrl+y and Comma)
" NOTE: Don't worry about key map. you can change it easily.
" +-------------------------------------
" | <!DOCTYPE HTML>
" | <html lang="en">
" | <head>
" | <title></title>
" | <meta charset="UTF-8">
" | </head>
" | <body>
" | _
" | </body>
" | </html>
" +-------------------------------------
" Type following
" +-------------------------------------
" | div#foo$*2>div.bar
" +-------------------------------------
" And type "<c-y>,"
" +-------------------------------------
" |<div id="foo1">
" | <div class="bar">_</div>
" |</div>
" |<div id="foo2">
" | <div class="bar"></div>
" |</div>
" +-------------------------------------
"
" Tips:
"
" You can customize behavior of expanding with overriding config.
" This configuration will be marged at loading plugin.
"
" let g:user_zen_settings = {
" \ 'indentation' : ' ',
" \ 'perl' : {
" \ 'aliases' : {
" \ 'req' : 'require '
" \ },
" \ 'snippets' : {
" \ 'use' : "use strict\nuse warnings\n\n",
" \ 'warn' : "warn \"|\";",
" \ }
" \ }
" \}
"
" You can set language attribute in html using 'zen_settings.lang'.
"
" GetLatestVimScripts: 2981 1 :AutoInstall: zencoding.vim
" script type: plugin
if &cp || (exists('g:loaded_zencoding_vim') && g:loaded_zencoding_vim)
finish
endif
let g:loaded_zencoding_vim = 1
let s:save_cpo = &cpo
set cpo&vim
if !exists('g:zencoding_debug')
let g:zencoding_debug = 0
endif
if !exists('g:zencoding_curl_command')
let g:zencoding_curl_command = 'curl -s -L'
endif
if exists('g:use_zen_complete_tag') && g:use_zen_complete_tag
setlocal omnifunc=zencoding#CompleteTag
endif
if !exists('g:user_zen_leader_key')
let g:user_zen_leader_key = '<c-y>'
endif
function! s:install_plugin()
for item in [
\ {'mode': 'i', 'var': 'user_zen_expandabbr_key', 'key': ',', 'plug': 'ZenCodingExpandAbbr', 'func': '<c-g>u<esc>:call zencoding#expandAbbr(0)<cr>a'},
\ {'mode': 'v', 'var': 'user_zen_expandabbr_key', 'key': ',', 'plug': 'ZenCodingExpandVisual', 'func': ':call zencoding#expandAbbr(2)<cr>'},
\ {'mode': 'n', 'var': 'user_zen_expandabbr_key', 'key': ',', 'plug': 'ZenCodingExpandNormal', 'func': ':call zencoding#expandAbbr(3)<cr>'},
\ {'mode': 'i', 'var': 'user_zen_expandword_key', 'key': ';', 'plug': 'ZenCodingExpandWord', 'func': '<c-g>u<esc>:call zencoding#expandAbbr(1)<cr>a'},
\ {'mode': 'n', 'var': 'user_zen_expandword_key', 'key': ',', 'plug': 'ZenCodingExpandWord', 'func': ':call zencoding#expandAbbr(1)<cr>'},
\ {'mode': 'i', 'var': 'user_zen_balancetaginward_key', 'key': 'd', 'plug': 'ZenCodingBalanceTagInwardInsert', 'func': '<esc>:call zencoding#balanceTag(1)<cr>a'},
\ {'mode': 'n', 'var': 'user_zen_balancetaginward_key', 'key': 'd', 'plug': 'ZenCodingBalanceTagInwardNormal', 'func': ':call zencoding#balanceTag(1)<cr>'},
\ {'mode': 'v', 'var': 'user_zen_balancetaginward_key', 'key': 'd', 'plug': 'ZenCodingBalanceTagInwardVisual', 'func': ':call zencoding#balanceTag(2)<cr>'},
\ {'mode': 'i', 'var': 'user_zen_balancetagoutward_key', 'key': 'D', 'plug': 'ZenCodingBalanceTagOutwardInsert', 'func': '<esc>:call zencoding#balanceTag(-1)<cr>a'},
\ {'mode': 'n', 'var': 'user_zen_balancetagoutward_key', 'key': 'D', 'plug': 'ZenCodingBalanceTagOutwardNormal', 'func': ':call zencoding#balanceTag(-1)<cr>'},
\ {'mode': 'v', 'var': 'user_zen_balancetagoutward_key', 'key': 'D', 'plug': 'ZenCodingBalanceTagOutwardVisual', 'func': ':call zencoding#balanceTag(-2)<cr>'},
\ {'mode': 'i', 'var': 'user_zen_next_key', 'key': 'n', 'plug': 'ZenCodingNext', 'func': '<esc>:call zencoding#moveNextPrev(0)<cr>'},
\ {'mode': 'n', 'var': 'user_zen_next_key', 'key': 'n', 'plug': 'ZenCodingNext', 'func': ':call zencoding#moveNextPrev(0)<cr>'},
\ {'mode': 'i', 'var': 'user_zen_prev_key', 'key': 'N', 'plug': 'ZenCodingPrev', 'func': '<esc>:call zencoding#moveNextPrev(1)<cr>'},
\ {'mode': 'n', 'var': 'user_zen_prev_key', 'key': 'N', 'plug': 'ZenCodingPrev', 'func': ':call zencoding#moveNextPrev(1)<cr>'},
\ {'mode': 'i', 'var': 'user_zen_imagesize_key', 'key': 'i', 'plug': 'ZenCodingImageSize', 'func': '<esc>:call zencoding#imageSize()<cr>a'},
\ {'mode': 'n', 'var': 'user_zen_imagesize_key', 'key': 'i', 'plug': 'ZenCodingImageSize', 'func': ':call zencoding#imageSize()<cr>'},
\ {'mode': 'i', 'var': 'user_zen_togglecomment_key', 'key': '/', 'plug': 'ZenCodingToggleComment', 'func': '<esc>:call zencoding#toggleComment()<cr>a'},
\ {'mode': 'n', 'var': 'user_zen_togglecomment_key', 'key': '/', 'plug': 'ZenCodingToggleComment', 'func': ':call zencoding#toggleComment()<cr>'},
\ {'mode': 'i', 'var': 'user_zen_splitjointag_key', 'key': 'j', 'plug': 'ZenCodingSplitJoinTagInsert', 'func': '<esc>:call zencoding#splitJoinTag()<cr>a'},
\ {'mode': 'n', 'var': 'user_zen_splitjointag_key', 'key': 'j', 'plug': 'ZenCodingSplitJoinTagNormal', 'func': ':call zencoding#splitJoinTag()<cr>'},
\ {'mode': 'i', 'var': 'user_zen_removetag_key', 'key': 'k', 'plug': 'ZenCodingRemoveTag', 'func': '<esc>:call zencoding#removeTag()<cr>a'},
\ {'mode': 'n', 'var': 'user_zen_removetag_key', 'key': 'k', 'plug': 'ZenCodingRemoveTag', 'func': ':call zencoding#removeTag()<cr>'},
\ {'mode': 'i', 'var': 'user_zen_anchorizeurl_key', 'key': 'a', 'plug': 'ZenCodingAnchorizeURL', 'func': '<esc>:call zencoding#anchorizeURL(0)<cr>a'},
\ {'mode': 'n', 'var': 'user_zen_anchorizeurl_key', 'key': 'a', 'plug': 'ZenCodingAnchorizeURL', 'func': ':call zencoding#anchorizeURL(0)<cr>'},
\ {'mode': 'i', 'var': 'user_zen_anchorizesummary_key', 'key': 'A', 'plug': 'ZenCodingAnchorizeSummary', 'func': '<esc>:call zencoding#anchorizeURL(1)<cr>a'},
\ {'mode': 'n', 'var': 'user_zen_anchorizesummary_key', 'key': 'A', 'plug': 'ZenCodingAnchorizeSummary', 'func': ':call zencoding#anchorizeURL(1)<cr>'},
\]
if !hasmapto('<plug>'.item.plug, item.mode)
exe item.mode . 'noremap <plug>' . item.plug . ' ' . item.func
endif
if !exists('g:' . item.var)
exe 'let g:' . item.var . " = '" . g:user_zen_leader_key . item.key . "'"
endif
if len(maparg(eval('g:' . item.var), item.mode)) == 0
exe item.mode . 'map <unique> ' . eval('g:' . item.var) . ' <plug>' . item.plug
endif
endfor
endfunction
call s:install_plugin()
delfunction s:install_plugin
let &cpo = s:save_cpo
unlet s:save_cpo
let g:user_zen_settings = {
\ 'indentation' : ' ',
\ 'php' : {
\ 'extends': 'html',
\ 'aliases' : {
\ },
\ 'snippets' : {
\ 'php': "<?php\n\t|\n?>",
\ 'sf:exe' : "public function |Action()\n{\n\n}",
\ 'pf' : "public function |()\n{\n\n}",
\ 'ppf' : "protected function |()\n{\n\n}",
\ 'pppf' : "private function |()\n{\n\n}",
\ 'sf:wsdl' : "/**\n * My Action\n *\n * @WSMethod(name='foo', webservice='myWs')\n * \n * @param type $name desc\n * \n * @return Foo[] Foo's\n */\npublic function execute|(sfWebRequest $request) {\n\n}",
\ 'sf:route': "foo:\n url:'/'\n param: { module: page, action: foo }\n",
\ 'sf:url': "url_for('@|');",
\ 'sf:link': "link_to('title', 'module/action');",
\ 'sf:cont': "sfContext::getInstance()->",
\ 'sf:form': "<form enctype=\"multipart/form-data\" action=\"<?php echo url_for('@') ?>\" method=\"post\">\n\t<div><?php echo $form->renderHiddenFields() ?></div>\n\t<div class=\"form\">\n\t\t|\n\t</div>\n</form>\n",
\ 'sf:pdo': "$con = Propel::getConnection();\n$stmt = $con->prepare('|');\n$stmt->bindValue();\n$stmt->execute();\n$results = $stmt->fetchAll();",
\ 'b:add': "$builder->add(\n '|',\n 'text',\n [\n 'label' => '',\n 'required' => true,\n 'attr' => [\n ],\n 'constraints' => [\n ],\n ]\n);",
\ 'b:addfile': "$builder->add(\n $builder->create(\n '|',\n 'file',\n [\n 'label' => '',\n 'attr' => [\n ],\n 'constraints' => [\n ],\n ]\n )->addModelTransformer(new \\Trinity\\Component\\Form\\DataTransformer\\StringToFileTransformer($builder->getData(), 'file'))\n);\n\n$builder->addEventSubscriber(\n new \\Trinity\\Component\\Form\\EventListener\\FileDeleteFormListener(\n $builder->getFormFactory(),\n [\n '|',\n ]\n )\n);",
\ 'foreach': "foreach($| as $k => $v) {\n\t\n}",
\ 'vard': "echo '<pre>', var_dump(|), '</pre>';\n",
\ 'vardd': "echo '<pre>', var_dump(|), '</pre>';\ndie;\n",
\ 'class': "class | {\n\tpublic function __construct() {\n\t\n\t}\n}\n",
\ 'cc': "/**\n * @var type\n */\n",
\ 'if': "if (|) {\n\n}",
\ 'for': "for ($u = 0; $u < |; $u++) {\n\t\n}",
\ 'while': "while(|) {\n\n}",
\ }
\ },
\ 'javascript' : {
\ 'aliases' : {
\ },
\ 'snippets' : {
\ 'ready': "$(document).ready(function() {\n\t|\n});",
\ 'closure': "(function($) {\n\t|\n})(jQuery);",
\ 'load': "$(|).load('', function(datas) {});",
\ 'if': "if (|) {\n\n}",
\ 'for': "for(var u=0; u<|; u++) {\n\t\n}",
\ 'while': "while(|) {\n\n}",
\ }
\ },
\ 'xml' : {
\ 'aliases' : {
\ },
\ 'snippets' : {
\ 'table': "<table name=\"\" phpName=\"\">\n\t\n</table>",
\ 'column': "<column name=\"\" type=\"integer\" size=\"\" required=\"true\" />\n",
\ 'fkey': "<foreign-key onUpdate=\"none\" foreignTable=\"\" onDelete=\"cascade\">\n\t\n</foreign-key>\n",
\ 'reference': "<reference local=\"\" foreign=\"\"/>\n"
\ }
\ },
\ 'twig' : {
\ 'extends': 'html',
\ 'aliases' : {
\ },
\ 'snippets' : {
\ 'if': "{% if | %}\n\n{% endif %}\n",
\ 'else': "{% else %}\n",
\ 'twig': "{% | %}\n",
\ 'include': "{% include \"|\" %}\n",
\ 'render': "{% render \"|\" %}\n",
\ 'vard': "<pre>{{ dump(|) }}</pre>\n",
\ 'vardd': "<pre>{{ dump(|) }}</pre>\n",
\ 'debug': "<pre>{{ dump(|) }}</pre>\n",
\ 'dump': "<pre>{{ dump(|) }}</pre>\n",
\ 'for': "{% for key, value in | %}\n\n{% endfor %}\n"
\ }
\ }
\}
" vim:set et:

198
vimrc
View File

@ -1,8 +1,8 @@
runtime! debian.vim
set nocompatible " be iMproved, required
filetype off " required
runtime! debian.vim
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
@ -11,6 +11,10 @@ endif
" PLUGINS
"""""""""""""""""""""""""""
let g:SuperTabDefaultCompletionType = "<c-x><c-o>"
let $PATH=$PATH . ':' . expand('~/.composer/vendor/bin')
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
@ -23,14 +27,12 @@ Plugin 'scrooloose/syntastic.git'
Plugin 'majutsushi/tagbar'
Plugin 'leafgarland/typescript-vim.git'
Plugin 'SirVer/ultisnips.git'
Plugin 'mattn/vdbi-vim'
Plugin 'taglist.vim'
Plugin 'bling/vim-airline.git'
Plugin 'kchmck/vim-coffee-script.git'
Plugin 'terryma/vim-multiple-cursors.git'
Plugin 'sheerun/vim-polyglot'
Plugin 'honza/vim-snippets.git'
Plugin 'tobyS/vmustache.git'
Plugin 'mattn/webapi-vim'
Plugin 'sjl/gundo.vim.git'
Plugin 'godlygeek/tabular.git'
Plugin 'tpope/vim-fugitive.git'
@ -41,21 +43,17 @@ Plugin 'tpope/vim-surround.git'
Plugin 'scrooloose/nerdtree'
Plugin 'nerdtree-ack'
Plugin 'php-cs-fixer'
Plugin 'php-doc'
Plugin 'php-doc-upgrade'
Plugin 'php.vim'
Plugin 'ZenCoding.vim'
Plugin 'closetag.vim'
Plugin 'vim-scripts/Emmet.vim'
Plugin 'beyondwords/vim-twig'
Plugin 'Shougo/vimproc'
Plugin 'Shougo/unite.vim'
Plugin 'm2mdas/phpcomplete-extended'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'phpfolding.vim'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'raimondi/delimitmate'
Plugin 'dietsche/vim-lastplace.git'
" Plugin 'phpvim/phpcd.vim'
call vundle#end()
@ -65,14 +63,10 @@ call vundle#end()
syntax on
" colorscheme Tomorrow-Night-Bright
colorscheme gruvbox
colorscheme Tomorrow-Night-Bright
"colorscheme gruvbox
set background=dark
"""""""""""""""""""""""""""
" PLUGINS CONFIGURATION
"""""""""""""""""""""""""""
if has("autocmd")
filetype plugin on
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
@ -80,57 +74,172 @@ endif
set statusline=%<%f%=%([%{Tlist_Get_Tagname_By_Line()}]%)
au Filetype html,xml,xsl,php,jsp,jspf,twig source ~/.vim/bundle/closetag.vim/plugin/closetag.vim
" au VimEnter * NERDTree
set completeopt-=preview
let g:nerdtree_tabs_open_on_gui_startup = 2
let g:nerdtree_tabs_open_on_console_startup = 2
let g:nerdtree_tabs_autoclose = 0
"""""""""""""""""""""""""""
" PLUGINS CONFIGURATION
"""""""""""""""""""""""""""
" SNIPS
"""""""
let g:snips_author = "Simon Vieille <simon@deblan.fr>"
let g:snips_email = "simon@deblan.fr"
let g:snips_github = "https://gitnet.fr/deblan"
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
let g:UltiSnipsEditSplit="vertical"
let g:user_zen_expandabbr_key = '<c-e>'
let g:use_zen_complete_tag = 1
" CLOSETAG
""""""""""
au Filetype html,xml,xsl,php,jsp,jspf,twig source ~/.vim/bundle/closetag.vim/plugin/closetag.vim
" NERDTree
""""""""""
let g:nerdtree_tabs_open_on_gui_startup = 2
let g:nerdtree_tabs_open_on_console_startup = 2
let g:nerdtree_tabs_autoclose = 0
" EMMET
"""""""
let g:user_emmet_expandabbr_key = '<c-e>'
let g:use_emmet_complete_tag = 1
let g:user_emmet_settings = {
\ 'indentation' : ' ',
\ 'php' : {
\ 'extends': 'html',
\ 'aliases' : {
\ },
\ 'snippets' : {
\ 'php': "<?php\n\t|\n?>",
\ 'sf:exe' : "public function |Action()\n{\n\n}",
\ 'pf' : "public function |()\n{\n\n}",
\ 'ppf' : "protected function |()\n{\n\n}",
\ 'pppf' : "private function |()\n{\n\n}",
\ 'sf:pdo': "$con = Propel::getConnection();\n$stmt = $con->prepare('|');\n$stmt->bindValue();\n$stmt->execute();\n$results = $stmt->fetchAll();",
\ 'b:add': "$builder->add(\n '|',\n 'text',\n [\n 'label' => '',\n 'required' => true,\n 'attr' => [\n ],\n 'constraints' => [\n ],\n ]\n);",
\ 'b:addfile': "$builder->add(\n $builder->create(\n '|',\n 'file',\n [\n 'label' => '',\n 'attr' => [\n ],\n 'constraints' => [\n ],\n ]\n )->addModelTransformer(new \\Trinity\\Component\\Form\\DataTransformer\\StringToFileTransformer($builder->getData(), 'file'))\n);\n\n$builder->addEventSubscriber(\n new \\Trinity\\Component\\Form\\EventListener\\FileDeleteFormListener(\n $builder->getFormFactory(),\n [\n '|',\n ]\n )\n);",
\ 'foreach': "foreach ($| as $k => $v) {\n\t\n}",
\ 'vard': "echo '<pre>', var_dump(|), '</pre>';\n",
\ 'vardd': "echo '<pre>', var_dump(|), '</pre>';\ndie;\n",
\ 'class': "class | {\n\tpublic function __construct() {\n\t\n\t}\n}\n",
\ 'cc': "/**\n * @var type\n */\n",
\ 'if': "if (|) {\n\n}",
\ 'for': "for ($u = 0; $u < |; $u++) {\n\t\n}",
\ 'while': "while (|) {\n\n}",
\ }
\ },
\ 'javascript' : {
\ 'aliases' : {
\ },
\ 'snippets' : {
\ 'ready': "$(document).ready(function() {\n\t|\n});",
\ 'closure': "(function($) {\n\t|\n})(jQuery);",
\ 'load': "$(|).load('', function(datas) {});",
\ 'if': "if (|) {\n\n}",
\ 'for': "for (var u=0; u<|; u++) {\n\t\n}",
\ 'while': "while (|) {\n\n}",
\ }
\ },
\ 'xml' : {
\ 'aliases' : {
\ },
\ 'snippets' : {
\ 'table': "<table name=\"\" phpName=\"\">\n\t\n</table>",
\ 'column': "<column name=\"\" type=\"integer\" size=\"\" required=\"true\" />\n",
\ 'fkey': "<foreign-key onUpdate=\"none\" foreignTable=\"\" onDelete=\"cascade\">\n\t\n</foreign-key>\n",
\ 'reference': "<reference local=\"\" foreign=\"\"/>\n"
\ }
\ },
\ 'twig' : {
\ 'extends': 'html',
\ 'aliases' : {
\ },
\ 'snippets' : {
\ 'if': "{% if | %}\n\n{% endif %}\n",
\ 'else': "{% else %}\n",
\ 'elseif': "{% elseif %}\n",
\ 'twig': "{% | %}\n",
\ 'include': "{% include \"|\" %}\n",
\ 'render': "{% render \"|\" %}\n",
\ 'vard': "<pre>{{ dump(|) }}</pre>\n",
\ 'vardd': "<pre>{{ dump(|) }}</pre>\n",
\ 'debug': "<pre>{{ dump(|) }}</pre>\n",
\ 'dump': "<pre>{{ dump(|) }}</pre>\n",
\ 'for': "{% for key, value in | %}\n\n{% endfor %}\n"
\ }
\ }
\}
" GITGUTTER
"""""""""""
let g:gitgutter_max_signs = 1000
" CTAGS
"""""""
let Tlist_Process_File_Always = 1
let Tlist_Ctags_cmd='/usr/bin/ctags'
let Tlist_Ctags_Cmd='/usr/bin/ctags'
" PHP COMPLETE
""""""""""""""
" CTRLP
"""""""
let g:ctrlp_user_command = "/home/simon/bin/vim-find %s "
" NEOCOMPLETE
"""""""""""""
function! s:my_cr_function()
return neocomplete#close_popup() . "\<CR>"
"return (pumvisible() ? "\<C-y>" : "" ) . "\<CR>"
"inoremap <expr> <C-n> pumvisible() ? '<C-n>' :
"" \ '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
endfunction
if !exists('g:neocomplete#keyword_patterns')
let g:neocomplete#keyword_patterns = {}
endif
if !exists('g:neocomplete#force_omni_input_patterns')
let g:neocomplete#force_omni_input_patterns = {}
endif
let g:acp_enableAtStartup = 0
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_smart_case = 1
let g:neocomplete#sources#syntax#min_keyword_length = 3
"let g:neocomplete#force_omni_input_patterns.php = '\h\w*\|[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
let g:neocomplete#force_omni_input_patterns.php = '\h\w*\|[^- \t]->\w*'
let g:neocomplete#lock_buffer_name_pattern = '\*ku\*'
let g:neocomplete#sources#dictionary#dictionaries = {
\ 'default' : '',
\ 'vimshell' : $HOME.'/.vimshell_hist',
\ 'scheme' : $HOME.'/.gosh_completions'
\ }
if !exists('g:neocomplete#keyword_patterns')
let g:neocomplete#keyword_patterns = {}
endif
\ }
let g:neocomplete#keyword_patterns['default'] = '\h\w*'
let g:phpcomplete_index_composer_command = 'composer'
inoremap <expr><C-g> neocomplete#undo_completion()
inoremap <expr><C-l> neocomplete#complete_common_string()
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
function! s:my_cr_function()
return neocomplete#close_popup() . "\<CR>"
endfunction
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
inoremap <expr><C-h> neocomplete#smart_close_popup()."\<C-h>"
inoremap <expr><BS> neocomplete#smart_close_popup()."\<C-h>"
inoremap <expr><C-y> neocomplete#close_popup()
let g:pdv_template_dir = $HOME ."/.vim/bundle/pdv/templates_snip"
nnoremap <buffer> <C-p> :call pdv#DocumentWithSnip()<CR>
au BufRead,BufNewFile *.php inoremap <buffer> <C-P> :call pdv#DocumentWithSnip()<CR>
" PDV (DOC)
"""""""""""
function! PhpSyntaxOverride()
hi! def link phpDocTags phpDefine
hi! def link phpDocParam phpType
@ -141,11 +250,13 @@ augroup phpSyntaxOverride
autocmd FileType php call PhpSyntaxOverride()
augroup END
let g:pdv_template_dir = $HOME."/.vim/bundle/pdv/templates_snip/"
"""""""""""""""""""""""""""
" MAPPING
"""""""""""""""""""""""""""
set keywordprg=pman
" set keywordprg=pman
let mapleader = "_"
map <F1> :!indentation %<CR>
map <F2> :call PhpCsFixerFixFile()<CR>
@ -153,7 +264,6 @@ map <F7> :r!namespace %<CR>
map <F8> :!phpmd % text /usr/share/phpmd/psr2.xml \| cut -d: -f2-<CR>
map <F10> :%!/home/simon/bin/indentation<CR>
map <c-B> :!php -l %<CR>
map <c-O> :CommandT<CR>
map <c-s> :w<CR>
map <F6> :call PhpInsertUse()<CR>
nnoremap <F5> :GundoToggle<CR>
@ -192,8 +302,10 @@ autocmd FileType json setlocal expandtab
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
" autocmd FileType php setlocal omnifunc=phpcd#CompletePHP
autocmd FileType php setlocal omnifunc=phpcomplete#CompletePHP
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
au BufNewFile,BufRead *.yaml,*.yml so ~/.vim/yaml.vim
au BufNewFile,BufRead *.yaml,*.yml setfiletype yaml
au BufRead,BufNewFile *.twig setfiletype twig