Browse Source

Changements plugins

Thibaut Marty 7 years ago
parent
commit
71e72fe460
7 changed files with 107 additions and 53 deletions
  1. 10 4
      README.md
  2. 5 8
      mappings.vim
  3. 92 9
      plugins.vim
  4. 0 4
      specifiques.vim
  5. 0 20
      statusline.vim
  6. 0 7
      theme.vim
  7. 0 1
      vimrc

+ 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
 

+ 5 - 8
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>
@@ -19,8 +21,9 @@ map Q <Nop>
 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 +35,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

+ 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

+ 0 - 1
vimrc

@@ -1,7 +1,6 @@
 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