diff --git a/vim/bundle/Vundle.vim b/vim/bundle/Vundle.vim index 8db3bcb..0b28e33 160000 --- a/vim/bundle/Vundle.vim +++ b/vim/bundle/Vundle.vim @@ -1 +1 @@ -Subproject commit 8db3bcb5921103f0eb6de361c8b25cc03cb350b5 +Subproject commit 0b28e334e65b6628b0a61c412fcb45204a2f2bab diff --git a/vim/config/parametrage-plugins.vim b/vim/config/parametrage-plugins.vim index 0560be8..0349a61 100644 --- a/vim/config/parametrage-plugins.vim +++ b/vim/config/parametrage-plugins.vim @@ -4,3 +4,6 @@ runtime config/plugin/tagbar.vim runtime config/plugin/vim-yardoc.vim runtime config/plugin/php.vim.vim runtime config/plugin/vim-highlight.vim +runtime config/plugin/jscomplete-vim.vim +runtime config/plugin/vim-javascript-syntax.vim +runtime config/plugin/javascript-libraries-syntax.vim diff --git a/vim/config/parametrage-vim.vim b/vim/config/parametrage-vim.vim index 15dbada..ddb0cac 100644 --- a/vim/config/parametrage-vim.vim +++ b/vim/config/parametrage-vim.vim @@ -2,7 +2,7 @@ set encoding=utf-8 " Encodage par défaut set tabstop=4 " Tabulation de 8 caractères set shiftwidth=4 " Idem -set noexpandtab " Utilise le caractère tabulation, pas des espaces +set expandtab " 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 diff --git a/vim/config/parametrage.vim b/vim/config/parametrage.vim index 5e8a8d8..0862e49 100644 --- a/vim/config/parametrage.vim +++ b/vim/config/parametrage.vim @@ -24,3 +24,5 @@ autocmd BufEnter apti,*.rb " Apti (ruby) : tabulation = 2 espaces \ set tabstop=2| \ set shiftwidth=2| \ set expandtab + +autocmd BufEnter *.js :%foldo! diff --git a/vim/config/plugin/javascript-libraries-syntax.vim b/vim/config/plugin/javascript-libraries-syntax.vim new file mode 100644 index 0000000..8fc53ab --- /dev/null +++ b/vim/config/plugin/javascript-libraries-syntax.vim @@ -0,0 +1 @@ +let g:used_javascript_libs = 'jquery' diff --git a/vim/config/plugin/jscomplete-vim.vim b/vim/config/plugin/jscomplete-vim.vim new file mode 100644 index 0000000..63b9e15 --- /dev/null +++ b/vim/config/plugin/jscomplete-vim.vim @@ -0,0 +1,2 @@ +autocmd FileType javascript setl omnifunc=jscomplete#CompleteJS +let g:jscomplete_use = ['dom'] diff --git a/vim/config/plugin/vim-javascript-syntax.vim b/vim/config/plugin/vim-javascript-syntax.vim new file mode 100644 index 0000000..0dbc029 --- /dev/null +++ b/vim/config/plugin/vim-javascript-syntax.vim @@ -0,0 +1 @@ +autocmd FileType javascript call JavaScriptFold() diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index a6fb262..6898d4d 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -22,7 +22,11 @@ Plugin 'ChrisYip/Better-CSS-Syntax-for-Vim' Plugin 'noprompt/vim-yardoc' Plugin 'php.vim--Hodge' -Plugin 'darkelfe/vim-highlight' +Plugin 'https://bitbucket.org/teramako/jscomplete-vim.git' +Plugin 'jelera/vim-javascript-syntax' +Plugin 'othree/javascript-libraries-syntax.vim' + +"Plugin 'darkelfe/vim-highlight' " Thème Plugin 'tomasr/molokai' diff --git a/vim/config/shorcuts.vim b/vim/config/shorcuts.vim index 88344b6..7cac9d5 100644 --- a/vim/config/shorcuts.vim +++ b/vim/config/shorcuts.vim @@ -1,24 +1,28 @@ " Couper, copier et coller avec le presse-papier du système if has('x11') && has('clipboard') - :nmap "+dd - :nmap "+yy - :nmap "+p + :nmap "+dd + :nmap "+yy + :nmap "+p - :vmap "+d - :vmap "+ygv - :vmap "+p + :vmap "+d + :vmap "+y + :vmap "+p - :imap "+ddi - :imap "+yyi - :imap "+pi + :imap "+ddi + :imap "+yyi + :imap "+pi endif " Opérations standards -:nmap :w " Sauvegarder -:nmap :q " Ferme le fichier actuel -:nmap :qa " Quitter (fermer tous) + " Sauvegarder +:nmap :w +:imap :wi +:vmap :wgv -:nmap ggVG " Selectionner tout +:nmap :q +:nmap :qa + +:nmap ggVG " Déplacement ligne vers le haut / bas :nnoremap ddp @@ -74,6 +78,7 @@ endif " Autocomplétion :imap  +:imap  :imap  :imap  @@ -91,5 +96,8 @@ endif :nmap :SyntasticReset:SyntasticCheck :nmap :SyntasticCheck +" Coloration syntaxique (debugage) +:nmap :echo 'id : '.synID(line('.'), col('.'), 0).' - rule : '.synIDattr(synID(line('.'), col('.'), 0), 'name').' - highlight : '.synIDattr(synIDtrans(synID(line('.'), col('.'), 0)), 'name') + " Autres :nmap :w:e