Skip to content

Instantly share code, notes, and snippets.

@iamdey
Last active August 29, 2015 14:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamdey/19c840972b4ea006553a to your computer and use it in GitHub Desktop.
Save iamdey/19c840972b4ea006553a to your computer and use it in GitHub Desktop.
configuration de vim pour le développement

config vim pour le développement par Patrice FERLET

Ce script reprend les différentes commandes présentés dans la vidéo suivante :

https://www.youtube.com/watch?v=srGrhjOEx7M

Pré-requis

Le plugin Tagbar dépend de ctags :

sudo apt-get install exuberant-ctags

Installation et paramétrage

(Attention ce script n'est pas idempotent, il faudra éventuellement vider le fichier ~/.vimrc avant de commencer)

lancer le script pour l'utilisateur courant :

sh ./install.sh

à tester :

colorscheme torte
set bg=dark

# rechercher dans le repertoire
vimgrep "motclé" repertoire/**
cwindow

autres bundles

# aide à l'autocomplétion
git clone https://github.com/msanders/snipmate.vim.git ~/.vim/bundle/snipmate

Annexes

Liste des liens présentés ici :

#!/bin/bash
# Le meta plugin pathogen qui permet d'installer d'autres plugins en tant que bundle
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
# initialisation
echo """
execute pathogen#infect()
syntax on
filetype plugin indent on
""" >> ~/.vimrc
# L'arborescence de fichier grâce à nerdtree :
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
# navigation par onglet avec airline
git clone https://github.com/bling/vim-airline.git ~/.vim/bundle/vim-airline
# activation
echo """
let g:airline#extensions#tabline#enabled = 1
""" >> ~/.vimrc
# raccourcis pour changer de buffer (onglet) et activation de la souris (mode visuel)
echo """
\" shortcuts
nmap <C-n> :bn<CR>
nmap <C-p> :bp<CR>
set mouse=a
""" >> ~/.vimrc
# Le plugin syntastic de vérification syntaxique
git clone https://github.com/scrooloose/syntastic.git ~/.vim/bundle/syntastic
# Tagbar pour afficher la structure d'un fichier (variables classes etc.)
git clone https://github.com/majutsushi/tagbar.git ~/.vim/bundle/tagbar
echo """
nmap <F2> :TagbarToggle<CR>
set omnifunc=syntaxcomplete#Complete
""" >> ~/.vimrc
echo """
colorscheme slate
set bg=light
set number
""" >> ~/.vimrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment