-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
107 lines (88 loc) · 3.13 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
" /etc/vim/vimrc ou ~/.vimrc
" Fichier de configuration de Vim
" Formation Debian GNU/Linux par Alexis de Lattre
" http://www.via.ecp.fr/~alexis/formation-linux/
" ':help options.txt' ou ':help nom_du_paramètre' dans Vim
" pour avoir de l'aide sur les paramètres de ce fichier de configuration
" Avertissement par flash (visual bell) plutôt que par beep
" set vb
" Active la coloration syntaxique
syntax on
" Utiliser le jeu de couleurs standard
colorscheme default
" Affiche la position du curseur 'ligne,colonne'
set ruler
" Affiche une barre de status en bas de l'écran
set laststatus=2
" Contenu de la barre de status
set statusline=%<%f%h%m%r%=%l,%c\ %P
" Largeur maxi du texte inséré
" '72' permet de wrapper automatiquement à 72 caractères
" '0' désactive la fonction
set textwidth=0
" Wrappe à 72 caractères avec la touche '#'
map # {v}! par 72
" Wrappe et justifie à 72 caractères avec la touche '@'
map @ {v}! par 72j
" Ne pas assurer la compatibilité avec l'ancien Vi
set nocompatible
" Nombre de colonnes
"set columns=170
" Nombre de commandes dans l'historique
set history=50
" Options du fichier ~/.viminfo
set viminfo='20,\"50
" Active la touche Backspace
set backspace=2
" Autorise le passage d'une ligne à l'autre avec les flèches gauche et droite
set whichwrap=<,>,[,]
" Garde toujours une ligne visible à l'écran au dessus du curseur
set scrolloff=1
" Affiche les commandes dans la barre de status
set showcmd
" Affiche la paire de parenthèses
set showmatch
" Essaye de garder le curseur dans la même colonne quand on change de ligne
set nostartofline
" Option de la complétion automatique
set wildmode=list:full
" Par défaut, ne garde pas l'indentation de la ligne précédente
" quand on commence une nouvelle ligne
set autoindent
" Options d'indentation pour un fichier C
set cinoptions=(0
" xterm-debian est un terminal couleur
if &term =~ "xterm-debian" || &term =~ "xterm-xfree86"
set t_Co=16
set t_Sf=[3%dm
set t_Sb=[4%dm
endif
" Quand on fait de la programmation, on veut qu'il n'y ait jamais de
" vraies tabulations insérées mais seulement 4 espaces
"autocmd BufNewfile,BufRead *.c set expandtab
"autocmd BufNewfile,BufRead *.c set tabstop=4
"autocmd BufNewfile,BufRead *.h set expandtab
"autocmd BufNewfile,BufRead *.h set tabstop=4
"autocmd BufNewfile,BufRead *.cpp set expandtab
"autocmd BufNewfile,BufRead *.cpp set tabstop=4
autocmd BufNewfile,BufRead *.yaml set tabstop=2
autocmd BufNewfile,BufRead *.yml set tabstop=2
autocmd BufNewfile,BufRead * set expandtab
autocmd BufNewfile,BufRead * set tabstop=4
" Décommentez les 2 lignes suivantes si vous voulez avoir les tabulations et
" les espaces marqués en caractères bleus
"set list
"set listchars=tab:>-,trail:-
" Les recherches ne sont pas 'case sensitives'
set ignorecase
" Fichier d'aide
set helpfile=$VIMRUNTIME/doc/help.txt.gz
" Le découpage des folders se base sur l'indentation
set foldmethod=indent
" 12 niveaux d'indentation par défaut pour les folders
set foldlevel=12
" Police de caractère pour Gvim qui supporte le symbole euro
set guifont=-misc-fixed-medium-r-semicondensed-*-*-111-75-75-c-*-iso8859-15
set nu
set sw=4
filetype indent on