runtime! debian.vim set nocompatible " be iMproved, required filetype off " required if filereadable("/etc/vim/vimrc.local") source /etc/vim/vimrc.local endif """"""""""""""""""""""""""" " PLUGINS """"""""""""""""""""""""""" set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'VundleVim/Vundle.vim' Plugin 'mileszs/ack.vim.git' Plugin 'Shougo/neocomplete.vim' Plugin 'tobyS/pdv.git' Plugin 'scrooloose/syntastic.git' Plugin 'majutsushi/tagbar' Plugin 'leafgarland/typescript-vim.git' Plugin 'SirVer/ultisnips.git' Plugin 'mattn/vdbi-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' Plugin 'airblade/vim-gitgutter.git' Plugin 'groenewege/vim-less.git' Plugin 'arnaud-lb/vim-php-namespace.git' 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 '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' call vundle#end() """"""""""""""""""""""""""" " THEME """"""""""""""""""""""""""" syntax on " colorscheme Tomorrow-Night-Bright colorscheme gruvbox set background=dark """"""""""""""""""""""""""" " PLUGINS CONFIGURATION """"""""""""""""""""""""""" if has("autocmd") filetype plugin on au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") 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 let g:nerdtree_tabs_open_on_gui_startup = 2 let g:nerdtree_tabs_open_on_console_startup = 2 let g:nerdtree_tabs_autoclose = 0 let g:UltiSnipsExpandTrigger="" let g:UltiSnipsJumpForwardTrigger="" let g:UltiSnipsJumpBackwardTrigger="" let g:UltiSnipsEditSplit="vertical" let g:user_zen_expandabbr_key = '' let g:use_zen_complete_tag = 1 let g:gitgutter_max_signs = 1000 let Tlist_Process_File_Always = 1 let Tlist_Ctags_cmd='/usr/bin/ctags' 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#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 neocomplete#undo_completion() inoremap neocomplete#complete_common_string() inoremap =my_cr_function() function! s:my_cr_function() return neocomplete#close_popup() . "\" endfunction inoremap pumvisible() ? "\" : "\" inoremap neocomplete#smart_close_popup()."\" inoremap neocomplete#smart_close_popup()."\" inoremap neocomplete#close_popup() let g:pdv_template_dir = $HOME ."/.vim/bundle/pdv/templates_snip" nnoremap :call pdv#DocumentWithSnip() au BufRead,BufNewFile *.php inoremap :call pdv#DocumentWithSnip() function! PhpSyntaxOverride() hi! def link phpDocTags phpDefine hi! def link phpDocParam phpType endfunction augroup phpSyntaxOverride autocmd! autocmd FileType php call PhpSyntaxOverride() augroup END """"""""""""""""""""""""""" " MAPPING """"""""""""""""""""""""""" set keywordprg=pman let mapleader = "_" map :!indentation % map :call PhpCsFixerFixFile() map :r!namespace % map :!phpmd % text /usr/share/phpmd/psr2.xml \| cut -d: -f2- map :%!/home/simon/bin/indentation map :!php -l % map :CommandT map :w map :call PhpInsertUse() nnoremap :GundoToggle """"""""""""""""""""""""""" " UI AND EDITION """"""""""""""""""""""""""" set mouse=a set autoindent set nu set showmatch set tabstop=4 set shiftwidth=4 set softtabstop=4 set incsearch set wildmenu set cursorline set guipty set fdc=2 " set guifont=Consolas\ 13 set guifont=Fantasque\ Sans\ Mono\ 14 set splitbelow set splitright autocmd FileType php setlocal expandtab autocmd FileType javascript setlocal expandtab autocmd FileType xml setlocal expandtab autocmd FileType css setlocal expandtab autocmd FileType coffee setlocal expandtab autocmd FileType ts setlocal expandtab autocmd FileType html setlocal expandtab autocmd FileType twig setlocal expandtab 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 python setlocal omnifunc=pythoncomplete#Complete autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags au BufNewFile,BufRead *.yaml,*.yml so ~/.vim/yaml.vim au BufRead,BufNewFile *.twig setfiletype twig