-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
69 lines (62 loc) · 1.84 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
" Ma super conf Vim "
runtime! debian.vim
" ------------ "
" Config perso "
" ------------ "
set autoindent
syntax on
set background=dark
set nu
set hlsearch
set incsearch
set shiftwidth=4
set softtabstop=4
set expandtab
set nocompatible
" affichage des espaces insécable utf8
highlight BadSpace ctermbg=magenta guibg=magenta
match BadSpace / /
autocmd WinEnter * match BadSpace / /
" les states salt sont en yaml
augroup filetypedetect
au BufNewFile,BufRead *.sls setf yaml
augroup END
" Airline config
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'
set laststatus=2 " Always show the statusline
" ---------------------------------------------------------------
" Correction orthographique fr/en
" Copié de https://github.com/nittch/dotfiles/blob/master/vimrc
" ---------------------------------------------------------------
function s:spell_fr()
if !exists("s:spell_check") || s:spell_check == 0
echo "Correction orthographique activée (français)"
let s:spell_check = 1
setlocal spell spelllang=fr
else
echo "Correction orthographique désactivée"
let s:spell_check = 0
setlocal spell spelllang=
endif
endfunction
" for English
function s:spell_en()
if !exists("s:spell_check") || s:spell_check == 0
echo "Correction orthographique activée (anglais)"
let s:spell_check = 1
setlocal spell spelllang=en
else
echo "Correction orthographique désactivée"
let s:spell_check = 0
setlocal spell spelllang=
endif
endfunction
" mapping français
noremap <F3> :call <SID>spell_fr()<CR>
inoremap <F3> <C-o>:call <SID>spell_fr()<CR>
vnoremap <F3> <C-o>:call <SID>spell_fr()<CR>
" mapping English
noremap <F4> :call <SID>spell_en()<CR>
inoremap <F4> <C-o>:call <SID>spell_en()<CR>
vnoremap <F4> <C-o>:call <SID>spell_en()<CR>