Plugins pour vim /!\ En-cours de rédaction /!\ 1) Paramètres de base :

" Empêcher la retro-compatibilité avec Vim l'ancètre
set nocompatible
" Affichage des numéros de lignes
set number
" Afficher une barre de statut (va avec Lightline)
set laststatus=2
" Surligner la ligne courante
set cursorline
" Menu pour la complétion
set wildmenu
" Afficher le titre du fichier dans le terminal
set title
" Recherche
" Commencer à chercher dès qu'on tape un texte de recherche
set incsearch
" Surligner les résultats d'une recherche
set hlsearch
" Ne pas tenir compte de la casse ...
set ignorecase
" ... sauf si on tape des majuscules
set smartcase
" Indentation
" 1 tabulation = 4 espaces
set tabstop=4
" Une indentation = 4 espaces
set shiftwidth=4
" Raccourcis clavier
" Ctrl+A ou Z (dés)active les numéros de lignes
map <c-a> :set nonumber<cr>
map <c-z> :set number<cr>
" Ctrl+F lance une recherche
map <c-f> /
" Onglet/tab
set showtabline=2
nnoremap <c-Left> :tabprevious<cr>
nnoremap <c-Right> :tabnext<cr>
nnoremap <silent> <a-Left> :execute 'silent! tabmove ' . (tabpagenr()-2)<cr>
nnoremap <silent> <a-Right> :execute 'silent! tabmove ' . (tabpagenr()+1)<cr>

2/ Pathogen : Installation

[~] ➔ mkdir -p ~/.vim/autoload ~/.vim/bundle
[~] ➔ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Ouvrir :

~/.vimrc

Ajouter :

execute pathogen#infect()
syntax on
filetype plugin indent on

Lien : https://github.com/tpope/vim-pathogen 3/ sensible.vim :

[~] ➔ cd ~/.vim/bundle
[~/.vim/bundle] ➔ git clone git://github.com/tpope/vim-sensible.git

Lien : https://github.com/tpope/vim-sensible 4/ Installation de Nerdtree :

[~] ➔ cd ~/.vim/bundle
[~/.vim/bundle] ➔ git clone https://github.com/scrooloose/nerdtree.git

Commandes :

:Helptags
:help NERD_tree.txt
:NERDtree

Lien : https://github.com/scrooloose/nerdtree 5/ Mundo :

[~] ➔ cd ~/.vim/bundle
[~/.vim/bundle] ➔ git clone https://github.com/simnalamburt/vim-mundo.git

Paramètres :

" Enable persistent undo so that undo history persists across vim sessions
set undofile
set undodir=~/.vim/undo
nnoremap <f5> :GundoToggle<cr>
let g:mundo_width = 40
let g:mundo_preview_height = 40
let g:mundo_right = 1

Paramètres :

" Ctrl+U lance Mundo
map <c-u> :MundoToggle<cr>

Commandes :

:MundoToggle

Lien : http://simnalamburt.github.io/vim-mundo/dist/ 6/ Supertab : Installation :

[~] ➔ cd ~/.vim/bundle
[~/.vim/bundle] ➔ git clone https://github.com/ervandew/supertab.git

Lien : https://github.com/ervandew/supertab 7/ Syntastic : Installation :

[~] ➔ cd ~/.vim/bundle
[~/.vim/bundle] ➔ git clone https://github.com/scrooloose/syntastic.git

Paramètres :

set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

Lien : https://github.com/scrooloose/syntastic 8/ Installation de Nerdtree-tabs :

[~] ➔ cd ~/.vim/bundle
[~/.vim/bundle] ➔ git clone https://github.com/jistr/vim-nerdtree-tabs.git

Commandes : Paramètres :

" Ctrl+N lance NerdTree
map <c-n> :NERDTreeTabsToggle<cr>

Lien : https://github.com/jistr/vim-nerdtree-tabs 9/ Lightline Installation :

[~] ➔ cd ~/.vim/bundle
[~/.vim/bundle] ➔ git clone https://github.com/itchyny/lightline.vim.git

Commande : Paramètres : Lien : https://github.com/itchyny/lightline.vim Raccourci-claviers :

  • Switcher entre les fenêtres :
<ctrl> + ww
  • Fermer toutes les fenêtres :
:qa!

* Dans NERDTree :

  • Ouvrir un fichier dans une tab :
t