7 Komitmen 6f2f320b86 ... eb9166c47d

Pembuat SHA1 Pesan Tanggal
  Thibaut Marty eb9166c47d Fusionne les fichiers (en vue de réorganisation) 7 tahun lalu
  Thibaut Marty fe0543f468 Enlève les fonctions inutiles + pastetoggle 7 tahun lalu
  Thibaut Marty 71e72fe460 Changements plugins 7 tahun lalu
  Thibaut Marty f553fc2a6e Ignore le dossier pour la correction orthographique 7 tahun lalu
  Thibaut Marty e4ef0f2c8e fillchars, laststatus, wildmenu, nostartofline, mouse, clipboard, tex/latex 7 tahun lalu
  Thibaut Marty 5fdfc94fcb ftplugin : setlocal 7 tahun lalu
  Thibaut Marty 30d4e48600 Compatibilité Neovim 7 tahun lalu
18 mengubah file dengan 489 tambahan dan 120 penghapusan
  1. 1 0
      .gitignore
  2. 10 4
      README.md
  3. 0 32
      fonctions.vim
  4. 1 1
      ftplugin/cpp.vim
  5. 0 2
      ftplugin/help.vim
  6. 7 1
      ftplugin/mail.vim
  7. 1 0
      ftplugin/make.vim
  8. 0 2
      ftplugin/ocaml.vim
  9. 16 2
      ftplugin/tex.vim
  10. 1 1
      ftplugin/vim.vim
  11. 1 0
      init.vim
  12. 5 15
      mappings.vim
  13. 92 9
      plugins.vim
  14. 21 5
      set.vim
  15. 0 4
      specifiques.vim
  16. 0 20
      statusline.vim
  17. 0 7
      theme.vim
  18. 333 15
      vimrc

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 .netrwhist
 backups
 bundle
+spell

+ 10 - 4
README.md

@@ -42,19 +42,25 @@ rm -rf .vim .vimrc
 ## Liste des plugins
 
 * [nerdtree](https://github.com/scrooloose/nerdtree)
-* [supertab](https://github.com/ervandew/supertab)
 * [vim-numbertoggle](https://github.com/jeffkreeftmeijer/vim-numbertoggle)
 * [vim-fugitive](https://github.com/tpope/vim-fugitive)
+* [vim-dispatch](https://github.com/tpope/vim-dispatch)
 * [vim-gitgutter](https://github.com/airblade/vim-gitgutter)
 * [matchit](https://github.com/tmhedberg/matchit)
 * [gruvbox](https://github.com/morhetz/gruvbox)
 * [CamelCaseMotion](https://github.com/bkad/CamelCaseMotion)
 * [vim-autoclose](https://github.com/Townk/vim-autoclose)
 * [vim-endwise](https://github.com/tpope/vim-endwise)
-* [vim-easymotion](https://github.com/Lokaltog/vim-easymotion)
-* [vim-easy-align](https://github.com/junegunn/vim-easy-align)
-* [omlet.vim](https://github.com/vim-scripts/omlet.vim)
+* [tagbar](https://github.com/majutsushi/tagbar)
+* [vim-buffergator](https://github.com/jeetsukumaran/vim-buffergator)
+* [undotree](https://github.com/mbbill/undotree)
 * [vim-windowswap](https://github.com/wesQ3/vim-windowswap)
+* [vim-airline](https://github.com/vim-airline/vim-airline)
+* [vim-commentary](https://github.com/tpope/vim-commentary)
+* [supertab](https://github.com/ervandew/supertab)
+* [vim-clang](https://github.com/justmao945/vim-clang)
+* [vimbufsync](https://github.com/let-def/vimbufsync)
+* [coquille](https://github.com/the-lambda-church/coquille)
 
 ## Licence
 

+ 0 - 32
fonctions.vim

@@ -1,32 +0,0 @@
-function! FileSize()
-  let bytes = getfsize(expand('%:p'))
-  if bytes <= 0
-    return ''
-  endif
-  if bytes < 1024
-    return bytes
-  else
-    return (bytes / 1024) . 'k'
-  endif
-endfunction
-
-
-function! HunkSummary()
-  if !get(g:, 'gitgutter_enabled', 0)
-    return ''
-  endif
-  let l:summary = GitGutterGetHunkSummary()
-  return '+'.l:summary[0].' ~'.l:summary[1].' -'.l:summary[2]
-endfunction
-
-
-function! PasteToggleMode()
-  let g:pastemode = !g:pastemode
-  if g:pastemode == 1
-    set paste
-    echo "paste"
-  else
-    set nopaste
-    echo "nopaste"
-  endif
-endfunction

+ 1 - 1
ftplugin/cpp.vim

@@ -1,2 +1,2 @@
 "# Programme d'aide
-set keywordprg=man
+setl keywordprg=man

+ 0 - 2
ftplugin/help.vim

@@ -1,2 +0,0 @@
-"# Dans l'aide, <CR> suit les liens
-nnoremap <buffer> <CR> <C-]>

+ 7 - 1
ftplugin/mail.vim

@@ -1,2 +1,8 @@
 "# Active la correction
-set spell
+setl spell
+
+"# Largeur maximale du texte
+setl tw=72
+
+"# Colonne coloré
+setl cc=72

+ 1 - 0
ftplugin/make.vim

@@ -1,4 +1,5 @@
 "# Utilise des vraies tabulations
 setlocal noexpandtab
+
 "# Affiche les tabulations comme des espaces
 setlocal listchars+=tab:\ \ 

+ 0 - 2
ftplugin/ocaml.vim

@@ -1,2 +0,0 @@
-"# Pas de hightlight de ligne courante
-set nocursorline

+ 16 - 2
ftplugin/tex.vim

@@ -1,4 +1,18 @@
 "# Active la correction
-set spell
+setl spell
 
-set linebreak
+"# Ne coupe pas les mots en fin de ligne
+setl linebreak
+
+"# Configuration Tagbar (voir :helpgrep \.ctags)
+let g:tagbar_type_tex = {
+    \ 'ctagstype' : 'latex',
+    \ 'kinds'     : [
+        \ 's:sections',
+        \ 'g:graphics:0:0',
+        \ 'l:labels',
+        \ 'r:refs:1:0',
+        \ 'p:pagerefs:1:0'
+    \ ],
+    \ 'sort'    : 0
+\ }

+ 1 - 1
ftplugin/vim.vim

@@ -1,2 +1,2 @@
 "# Programme d'aide
-set keywordprg=:help
+setl keywordprg=:help

+ 1 - 0
init.vim

@@ -0,0 +1 @@
+vimrc

+ 5 - 15
mappings.vim

@@ -1,6 +1,8 @@
 "# Accès au début de ligne : au premier caractère non blanc
 " (le premier caractère est toujours accessible avec | )
 nmap 0 ^
+" 0 sans touche shift
+nmap à 0
 
 "# Remap <C-space> (= <Nul>) pour l'autocomplétion (<Tab>)
 imap <Nul> <Tab>
@@ -12,15 +14,9 @@ cabbrev w!! %!sudo tee > /dev/null %
 "# Désactive l'accès au mode Ex
 map Q <Nop>
 
-"# Touche pour activer le mode paste
-" (pour désactiver des comportements indésirables)
-" (N'utilise pas l'option pastetoggle car
-" cela crée un mapping aussi dans le mode insertion)
-let g:pastemode = 0
-nmap <Leader>p :call PasteToggleMode()<CR>
-
-"# Mapping pour lancer :make avec ,m
-map <Leader>m :make<CR>
+"# Mappings pour lancer :Make (vim-dispatch) (a)synchrone
+map <Leader>m :Make<CR>
+map <Leader>M :Make!<CR>
 
 "# Mapping pour activer/désactiver l'affichage "visuel"
 " des caracètres spéciaux (e.g : tabulation)
@@ -32,12 +28,6 @@ nmap <Leader>s :%s/\s\+$//e<CR>:nohlsearch<CR>
 "# Mapping pour créer le fichier tags (nécessite ctags)
 nmap <silent> <Leader><Leader>g :silent r!ctags -R &<CR>:echo "génération des tags lancée"<CR>
 
-" TODO : buffer
-"# Mapping pour ouvrir la première correspondance du tag
-" sous le curseur dans un nouvel onglet
-" (autres correspondances accessibles avec :tn / :tp)
-nmap <Leader>g <C-w><C-]><C-w>T
-
 "# Mapping pour aller à la faute précédente/suivante (spell)
 nmap (s [s
 nmap )s ]s

+ 92 - 9
plugins.vim

@@ -6,19 +6,53 @@ Plugin 'gmarik/Vundle.vim'
 
 "# Liste des plugins
 Plugin 'scrooloose/nerdtree'
-Plugin 'ervandew/supertab'
 Plugin 'jeffkreeftmeijer/vim-numbertoggle'
 Plugin 'tpope/vim-fugitive'
+Plugin 'tpope/vim-dispatch'
 Plugin 'airblade/vim-gitgutter'
 Plugin 'tmhedberg/matchit'
 Plugin 'morhetz/gruvbox'
 Plugin 'bkad/CamelCaseMotion'
 Plugin 'Townk/vim-autoclose'
 Plugin 'tpope/vim-endwise'
-Plugin 'Lokaltog/vim-easymotion'
-Plugin 'junegunn/vim-easy-align'
-Plugin 'vim-scripts/omlet.vim'
+Plugin 'majutsushi/tagbar'
+Plugin 'jeetsukumaran/vim-buffergator'
+Plugin 'mbbill/undotree'
 Plugin 'wesQ3/vim-windowswap'
+Plugin 'vim-airline/vim-airline'
+Plugin 'tpope/vim-commentary'
+Plugin 'ervandew/supertab'
+" TODO lire :h ins-completion
+" TODO : retab <tab> to <C-X><??> ?
+Plugin 'justmao945/vim-clang'
+"Plugin 'Valloric/YouCompleteMe'
+"Plugin 'jvoorhis/coq.vim'
+"Plugin 'vim-scripts/CoqIDE'
+
+" Dépendance pour coquille
+Plugin 'let-def/vimbufsync'
+Plugin 'the-lambda-church/coquille'
+
+" TODO ocaml: fichier .annot, maps (ANNOT : trouve le type du mot sous le curseur :D)
+" http://stackoverflow.com/questions/15514908/which-is-the-current-setup-to-use-ocaml-in-vim/17234163#17234163
+" annot : require compile with -annot
+au BufRead,BufNewFile *.ml,*.mli compiler ocaml
+
+" a tester
+" ocaml : https://github.com/the-lambda-church/merlin
+" coq   : https://github.com/the-lambda-church/coquille
+"Plugin 'xolox/vim-misc' " dépendance pour vim-easytags
+"Plugin 'xolox/vim-easytags' " idem ====> Que le fichier en cours ? Aucun intérêt si oui
+"Plugin 'airblade/vim-rooter' " combiné avec les tags (pour éviter d'avoir des fichiers tags dans les sous-dossiers)
+"Plugin 'octol/vim-cpp-enhanced-highlight' " idem
+"Plugin 'Xuyuanp/nerdtree-git-plugin' " => caractères moches
+
+" http://vim.wikia.com/wiki/Compiling_LaTeX_from_Vim#Automatic_LaTeX_plugin (à mettre dans ftplugin/tex ?)
+" Plugin 'coot/atp_vim'
+
+" TODO : cscope ?
+" https://en.wikipedia.org/wiki/Cscope
+" http://vim.wikia.com/wiki/Browsing_programs_with_tags#Comments
 
 call vundle#end()
 
@@ -26,9 +60,11 @@ call vundle#end()
 map <silent> w <Plug>CamelCaseMotion_w
 map <silent> b <Plug>CamelCaseMotion_b
 map <silent> e <Plug>CamelCaseMotion_e
+map <silent> ge <Plug>CamelCaseMotion_ge
 sunmap w
 sunmap b
 sunmap e
+sunmap ge
 
 "# Mapping pour activer/désactiver vim-autoclose
 nmap <silent> <Leader>a :AutoCloseToggle<CR>
@@ -36,12 +72,59 @@ nmap <silent> <Leader>a :AutoCloseToggle<CR>
 "# Mapping pour ouvrir/fermer NERDTree
 nmap <silent> <Leader>t :NERDTreeToggle<CR>
 
-"# Mapping pour EasyAlign
-vmap <Enter> <Plug>(EasyAlign)
+"# Mapping pour ouvrir/fermer TagBar
+nmap <silent> <Leader>r :TagbarToggle<CR>
+
+"# Mapping pour ouvrir/fermer Undotree
+nmap <silent> <Leader>u :UndotreeToggle<CR>
+
+"# Mapping pour GitGutter
+nmap <silent> gu :GitGutterUndoHunk<CR>
+nmap <silent> gn :GitGutterNextHunk<CR>
+nmap <silent> gp :GitGutterPrevHunk<CR>
+
+"# Ouvre NERDTree automatiquement
+"autocmd vimenter * NERDTree
+" focus sur la fenêtre principale
+"autocmd vimenter * wincmd w
+
+" et ferme vim s'il ne reste que NERDTree
+autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
+" NERDTree à droite
+
+let g:NERDTreeWinPos = "right"
+
+"# Paramètres de buffergator
+" Pas de chemin absolu
+let g:buffergator_show_full_directory_path = 0
+" Désactive tous les raccourcis d'accès
+let g:buffergator_suppress_keymaps = 1
+" Sauf ceux-ci :
+nmap <Leader>b :BuffergatorOpen<CR>
+nmap gb <C-^>
+" Fenêtre en haut, hauteur 8
+let g:buffergator_viewport_split_policy = "T"
+let g:buffergator_hsplit_size = 8
+
+"# Paramètres de Airline
+" Pas de vérifications sur les caractères blancs
+let g:airline#extensions#whitespace#checks = []
+
+"# N'active pas le completement automatiquement pour vim-clang
+"let g:clang_auto = 0
+
+" TODO : plutôt regrouper par outils (coq, …)
+"# Paramètres de vim-commentary
+autocmd FileType coq setlocal commentstring=(*\ %s\ *)
+map <buffer> <silent> <M-c> :CoqLaunch<CR>
+map <buffer> <silent> <M-j> :CoqNext<CR>
+map <buffer> <silent> <M-k> :CoqUndo<CR>
+map <buffer> <silent> <M-l> :CoqToCursor<CR>
+
 
-"# Touches pour EasyMotion
-" (par défaut : 'asdghklqwertyuiopzxcvbnmfj;')
-let g:EasyMotion_keys='qsdghklazertyuiopwxcvbnmfj;'
+"# Paramètres de coquille
+" Bouge le curseur
+let g:coquille_auto_move = 'true'
 
 "# Active l'indentation et les plugins spécifiques
 filetype indent on

+ 21 - 5
set.vim

@@ -29,10 +29,16 @@ set number
 set list
 set listchars=nbsp:¬,tab:»·,trail:·
 
+"# caractères de séparation de fenêtres
+set fillchars+=vert:\ ,fold:\ 
+
 "# Affichage de la dernière ligne, même non entière
 "# Affichage des caractères spéciaux sous form <hex> plutôt que ^X
 set display=lastline,uhex
 
+"# Affiche toujours la statusline
+set laststatus=2
+
 "# Pas de sonneries
 set noerrorbells
 set novisualbell
@@ -57,6 +63,9 @@ set hlsearch
 " et pour l'enlever : ,/
 nnoremap <silent> <Leader><Space> :nohlsearch<CR>
 
+"# Menus améliorés (e.g <Tab>)
+set wildmenu
+
 "# Désactive les fichiers swap
 set noswapfile
 set nobackup
@@ -66,8 +75,9 @@ set nowritebackup
 set spelllang=fr,en
 set spellsuggest=5
 
-"# Pas de repliement
-set nofoldenable
+"# Ne met pas le curseur au début de ligne lors du changement de buffer
+" (impacte aussi gg, G, H, M, L, %, d…)
+set nostartofline
 
 "# Effacement (backspace) fonctionnel
 set backspace=indent,eol,start
@@ -90,8 +100,14 @@ set confirm
 "# Surligne la ligne courante
 set cursorline
 
-"# Formatte le texte en le justifiant à 72 caractères (avec gq)
-set formatprg=par\ -j\ -w72
-
 "# Autorise de changer de buffer sans sauvegarder
 set hidden
+
+"# Pas de support de la souris
+set mouse=
+
+"# share clipboad with X
+set clipboard+=unnamedplus
+
+"# default *.tex files ftplugin to latex file type
+let g:tex_flavor = "latex"

+ 0 - 4
specifiques.vim

@@ -18,7 +18,3 @@ augroup DernierePosition
     \   exe "normal! g`\"" |
     \ endif
 augroup END
-
-"# Ouvre la fenêtre de quickfix après :make, :grep…
-autocmd QuickFixCmdPost [^l]* nested cwindow
-autocmd QuickFixCmdPost    l* nested lwindow

+ 0 - 20
statusline.vim

@@ -1,20 +0,0 @@
-"# Statusline
-" Informations git (branche +-~) :
-" (Vérifie que le plugin fugitive est accessible)
-if filereadable($HOME.'/.vim/bundle/vim-fugitive/plugin/fugitive.vim')
-  set statusline+=%{strlen(fugitive#statusline())?'\ \ ('.fugitive#statusline()[5:-3].'\ '.HunkSummary().')\ ':''}
-endif
-" Nom du fichier
-set statusline+=%f%<
-" Encodage du fichier
-set statusline+=\ %{strlen(&fenc)?'<'.&fenc.'>':'<aucun>'}
-" Taille du fichier
-set statusline+=\ %{FileSize()}
-" Drapeau modifié, read-only
-set statusline+=\ %m\ %r
-" Séparateur gauche droite
-set statusline+=%=
-" <ligne courante>/<total>:<colonne> | <pourcents>
-set statusline+=%l/%L:%v\ \|\ %4P\ 
-" L'affiche toujours
-set laststatus=2

+ 0 - 7
theme.vim

@@ -19,10 +19,3 @@ highlight clear SpellLocal
 highlight SpellLocal cterm=underline ctermfg=blue
 highlight clear SpellRare
 highlight SpellRare cterm=underline ctermfg=blue
-
-"# Couleur pour GitGutter
-"highlight clear SignColumn
-"highlight SignColumn ctermbg=235
-
-"# Pas de soulignement sous la ligne courante
-highlight CursorLine cterm=none

+ 333 - 15
vimrc

@@ -1,15 +1,333 @@
-source ~/.vim/set.vim
-source ~/.vim/fonctions.vim
-source ~/.vim/plugins.vim
-source ~/.vim/statusline.vim
-source ~/.vim/theme.vim
-source ~/.vim/specifiques.vim
-source ~/.vim/mappings.vim
-
-" TODO https://github.com/fholgado/minibufexpl.vim
-" Fix N CTRL-^
-" ou https://github.com/jlanzarotta/bufexplorer
-" ou https://github.com/ngn/vim-buf
-" ou
-  " https://bling.github.io/blog/2013/06/02/unite-dot-vim-the-plugin-you-didnt-know-you-need/ 
-  " https://github.com/Shougo/unite.vim
+" set.vim {{{
+"# Pas de compatibilité avec Vi (meilleur comportement)
+set nocompatible
+
+"# Encodage général
+set encoding=utf-8
+
+"# Change le <Leader> en , à la place de \
+let mapleader=","
+
+"# Indentation
+set autoindent
+" Intelligente ({}, commentaires...)
+set smartindent
+" Remplace les tabulations par des espaces
+set expandtab
+" <BS> supprime un niveau d'indentation
+set smarttab
+" Affiche 2 espaces pour les tabulations
+set tabstop=2
+" Indentation de 2 espaces
+set shiftwidth=2
+" Arrondi à un niveau d'indentation
+set shiftround
+
+"# Numérotation
+set number
+
+"# Affichage de caractères spéciaux
+set list
+set listchars=nbsp:¬,tab:»·,trail:·
+
+"# caractères de séparation de fenêtres
+set fillchars+=vert:\ ,fold:\ 
+
+"# Affichage de la dernière ligne, même non entière
+"# Affichage des caractères spéciaux sous form <hex> plutôt que ^X
+set display=lastline,uhex
+
+"# Affiche toujours la statusline
+set laststatus=2
+
+"# Pas de sonneries
+set noerrorbells
+set novisualbell
+
+"# Limites haute et basse du curseur
+set scrolloff=8
+
+"# Limites gauche et droite du curseur
+"set nowrap
+set sidescrolloff=3
+set sidescroll=1
+
+"# Recherche
+" Va au résultat directement
+set incsearch
+set ignorecase
+set smartcase
+" /g par défaut (remettre /g pour annuler)
+set gdefault
+" Surligne les résultats
+set hlsearch
+" et pour l'enlever : ,/
+nnoremap <silent> <Leader><Space> :nohlsearch<CR>
+
+"# Menus améliorés (e.g <Tab>)
+set wildmenu
+
+"# Désactive les fichiers swap
+set noswapfile
+set nobackup
+set nowritebackup
+
+"# Correction (à activer avec set spell)
+set spelllang=fr,en
+set spellsuggest=5
+
+"# Ne met pas le curseur au début de ligne lors du changement de buffer
+" (impacte aussi gg, G, H, M, L, %, d…)
+set nostartofline
+
+"# Effacement (backspace) fonctionnel
+set backspace=indent,eol,start
+
+"# Priorité aux fichiers avec un . dans l'autocomplétion
+" e.g : prog.c > prog
+set suffixes+=,,
+
+"# Méthode de cryptage (avec :X)
+if version >= 704 && has("patch399")
+  set cryptmethod=blowfish2
+endif
+
+"# Tilde avec motion
+set tildeop
+
+"# Demande une confirmation plutôt que de lever une erreur (:q, :e)
+set confirm
+
+"# Surligne la ligne courante
+set cursorline
+
+"# Autorise de changer de buffer sans sauvegarder
+set hidden
+
+"# Pas de support de la souris
+set mouse=
+
+"# share clipboad with X
+set clipboard+=unnamedplus
+
+"# default *.tex files ftplugin to latex file type
+let g:tex_flavor = "latex"
+" }}}
+" plugins.vim {{{
+"# Chargement de Vundle
+filetype off
+set rtp+=~/.vim/bundle/Vundle.vim
+call vundle#begin()
+Plugin 'gmarik/Vundle.vim'
+
+"# Liste des plugins
+Plugin 'scrooloose/nerdtree'
+Plugin 'jeffkreeftmeijer/vim-numbertoggle'
+Plugin 'tpope/vim-fugitive'
+Plugin 'tpope/vim-dispatch'
+Plugin 'airblade/vim-gitgutter'
+Plugin 'tmhedberg/matchit'
+Plugin 'morhetz/gruvbox'
+Plugin 'bkad/CamelCaseMotion'
+Plugin 'Townk/vim-autoclose'
+Plugin 'tpope/vim-endwise'
+Plugin 'majutsushi/tagbar'
+Plugin 'jeetsukumaran/vim-buffergator'
+Plugin 'mbbill/undotree'
+Plugin 'wesQ3/vim-windowswap'
+Plugin 'vim-airline/vim-airline'
+Plugin 'tpope/vim-commentary'
+Plugin 'ervandew/supertab'
+" TODO lire :h ins-completion
+" TODO : retab <tab> to <C-X><??> ?
+Plugin 'justmao945/vim-clang'
+"Plugin 'Valloric/YouCompleteMe'
+"Plugin 'jvoorhis/coq.vim'
+"Plugin 'vim-scripts/CoqIDE'
+
+" Dépendance pour coquille
+Plugin 'let-def/vimbufsync'
+Plugin 'the-lambda-church/coquille'
+
+" TODO ocaml: fichier .annot, maps (ANNOT : trouve le type du mot sous le curseur :D)
+" http://stackoverflow.com/questions/15514908/which-is-the-current-setup-to-use-ocaml-in-vim/17234163#17234163
+" annot : require compile with -annot
+au BufRead,BufNewFile *.ml,*.mli compiler ocaml
+
+" a tester
+" ocaml : https://github.com/the-lambda-church/merlin
+" coq   : https://github.com/the-lambda-church/coquille
+"Plugin 'xolox/vim-misc' " dépendance pour vim-easytags
+"Plugin 'xolox/vim-easytags' " idem ====> Que le fichier en cours ? Aucun intérêt si oui
+"Plugin 'airblade/vim-rooter' " combiné avec les tags (pour éviter d'avoir des fichiers tags dans les sous-dossiers)
+"Plugin 'octol/vim-cpp-enhanced-highlight' " idem
+"Plugin 'Xuyuanp/nerdtree-git-plugin' " => caractères moches
+
+" http://vim.wikia.com/wiki/Compiling_LaTeX_from_Vim#Automatic_LaTeX_plugin (à mettre dans ftplugin/tex ?)
+" Plugin 'coot/atp_vim'
+
+" TODO : cscope ?
+" https://en.wikipedia.org/wiki/Cscope
+" http://vim.wikia.com/wiki/Browsing_programs_with_tags#Comments
+
+call vundle#end()
+
+"# Remap les mouvements normaux (w, b, e) en mouvements CamelCaseMotion
+map <silent> w <Plug>CamelCaseMotion_w
+map <silent> b <Plug>CamelCaseMotion_b
+map <silent> e <Plug>CamelCaseMotion_e
+map <silent> ge <Plug>CamelCaseMotion_ge
+sunmap w
+sunmap b
+sunmap e
+sunmap ge
+
+"# Mapping pour activer/désactiver vim-autoclose
+nmap <silent> <Leader>a :AutoCloseToggle<CR>
+
+"# Mapping pour ouvrir/fermer NERDTree
+nmap <silent> <Leader>t :NERDTreeToggle<CR>
+
+"# Mapping pour ouvrir/fermer TagBar
+nmap <silent> <Leader>r :TagbarToggle<CR>
+
+"# Mapping pour ouvrir/fermer Undotree
+nmap <silent> <Leader>u :UndotreeToggle<CR>
+
+"# Mapping pour GitGutter
+nmap <silent> gu :GitGutterUndoHunk<CR>
+nmap <silent> gn :GitGutterNextHunk<CR>
+nmap <silent> gp :GitGutterPrevHunk<CR>
+
+"# Ouvre NERDTree automatiquement
+"autocmd vimenter * NERDTree
+" focus sur la fenêtre principale
+"autocmd vimenter * wincmd w
+
+" et ferme vim s'il ne reste que NERDTree
+autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
+" NERDTree à droite
+
+let g:NERDTreeWinPos = "right"
+
+"# Paramètres de buffergator
+" Pas de chemin absolu
+let g:buffergator_show_full_directory_path = 0
+" Désactive tous les raccourcis d'accès
+let g:buffergator_suppress_keymaps = 1
+" Sauf ceux-ci :
+nmap <Leader>b :BuffergatorOpen<CR>
+nmap gb <C-^>
+" Fenêtre en haut, hauteur 8
+let g:buffergator_viewport_split_policy = "T"
+let g:buffergator_hsplit_size = 8
+
+"# Paramètres de Airline
+" Pas de vérifications sur les caractères blancs
+let g:airline#extensions#whitespace#checks = []
+
+"# N'active pas le completement automatiquement pour vim-clang
+"let g:clang_auto = 0
+
+" TODO : plutôt regrouper par outils (coq, …)
+"# Paramètres de vim-commentary
+autocmd FileType coq setlocal commentstring=(*\ %s\ *)
+map <buffer> <silent> <M-c> :CoqLaunch<CR>
+map <buffer> <silent> <M-j> :CoqNext<CR>
+map <buffer> <silent> <M-k> :CoqUndo<CR>
+map <buffer> <silent> <M-l> :CoqToCursor<CR>
+
+
+"# Paramètres de coquille
+" Bouge le curseur
+let g:coquille_auto_move = 'true'
+
+"# Active l'indentation et les plugins spécifiques
+filetype indent on
+filetype plugin on
+" }}}
+" theme.vim {{{
+"# Active la coloration syntaxique
+syntax enable
+
+"# Mode sombre
+set background=dark
+
+"# Thème
+try
+  colorscheme gruvbox
+catch
+endtry
+
+"# Couleurs des mots mal écrits (exmaple)
+highlight clear SpellBad
+highlight SpellBad cterm=underline ctermfg=red
+highlight clear SpellCap
+highlight SpellCap cterm=underline ctermfg=blue
+highlight clear SpellLocal
+highlight SpellLocal cterm=underline ctermfg=blue
+highlight clear SpellRare
+highlight SpellRare cterm=underline ctermfg=blue
+" }}}
+" specifiques.vim {{{
+"# Undo persistant
+if has("persistent_undo")
+  " Crée le dossier s'il le faut
+  silent !mkdir ~/.vim/backups > /dev/null 2>&1
+  set undodir=~/.vim/backups
+  set undofile
+endif
+
+"# Clipboard mélangé avec celui de X
+if has("xterm_clipboard")
+  set clipboard=unnamedplus
+endif
+
+"# Revient à la même position à la réouverture d'un fichier
+augroup DernierePosition
+  autocmd BufReadPost *
+    \ if line("'\"") > 0 && line("'\"") <= line("$") |
+    \   exe "normal! g`\"" |
+    \ endif
+augroup END
+" }}}
+" mappings.vim {{{
+"# Accès au début de ligne : au premier caractère non blanc
+" (le premier caractère est toujours accessible avec | )
+nmap 0 ^
+" 0 sans touche shift
+nmap à 0
+
+"# Remap <C-space> (= <Nul>) pour l'autocomplétion (<Tab>)
+imap <Nul> <Tab>
+
+"# Commande w!! pour enregistrer avec sudo
+"cmap w!! %!sudo tee > /dev/null %
+cabbrev w!! %!sudo tee > /dev/null %
+
+"# Désactive l'accès au mode Ex
+map Q <Nop>
+
+"# Mappings pour lancer :Make (vim-dispatch) (a)synchrone
+map <Leader>m :Make<CR>
+map <Leader>M :Make!<CR>
+
+"# Mapping pour activer/désactiver l'affichage "visuel"
+" des caracètres spéciaux (e.g : tabulation)
+nmap <Leader>l :set list!<CR>
+
+"# Mapping pour enlever tous les espaces de fin de ligne
+nmap <Leader>s :%s/\s\+$//e<CR>:nohlsearch<CR>
+
+"# Mapping pour créer le fichier tags (nécessite ctags)
+nmap <silent> <Leader><Leader>g :silent r!ctags -R &<CR>:echo "génération des tags lancée"<CR>
+
+"# Mapping pour aller à la faute précédente/suivante (spell)
+nmap (s [s
+nmap )s ]s
+
+"# Mapping pour aller à la marque au caractère près
+nmap ' `
+" }}}
+
+" vim: set fen fdm=marker: