You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.1 KiB
VimL
64 lines
2.1 KiB
VimL
set nocompatible " Pas de compatibilité avec vi
|
|
|
|
runtime config/plugins.vim
|
|
runtime config/parametrage.vim
|
|
|
|
"=====================================================================
|
|
" Replacer le curseur à la dernière édition
|
|
"=====================================================================
|
|
set viminfo='10,\"100,:20,%,n~/.viminfo
|
|
autocmd BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe "norm '\""|else|exe "norm $"|endif|endif
|
|
|
|
"=====================================================================
|
|
" Gestion dictionnaire
|
|
"=====================================================================
|
|
if has("spell")
|
|
setlocal spell spelllang=
|
|
|
|
map ,lf :setlocal spell spelllang=fr<CR>
|
|
map ,le :setlocal spell spelllang=en<CR>
|
|
endif
|
|
|
|
set dictionary+=/usr/share/dict/french
|
|
set spellsuggest=5
|
|
|
|
autocmd BufEnter *.tex set spell
|
|
autocmd BufEnter *.tex set spelllang=fr
|
|
|
|
"=====================================================================
|
|
" Modification de l'affichage des replis
|
|
"=====================================================================
|
|
function! MyFoldFunction()
|
|
let line = getline(v:foldstart)
|
|
|
|
"Cleanup unwanted things in first line
|
|
let sub_space = substitute(line, '/\*\|\*/\|{', '', 'g')
|
|
let sub = substitute(sub_space, '\(^\s*\)\@<=\s', '-', 'g')
|
|
|
|
"Calculate lines in folded text
|
|
let lines = v:foldend - v:foldstart + 1
|
|
return sub.' {...'.lines.' lignes...} '
|
|
endfunction
|
|
|
|
set foldtext=MyFoldFunction()
|
|
|
|
"=====================================================================
|
|
" Poser une marque visible avec F7
|
|
"=====================================================================
|
|
hi Mark guibg=indianred guifg=white gui=bold cterm=bold ctermfg=7 ctermbg=1
|
|
sign define mark text=!> texthl=Mark
|
|
map <F7> :exe 'sign place 001 name=mark line='.line(".").' buffer='.winbufnr(0)<CR>
|
|
map <S-F7> :sign unplace<CR>
|
|
|
|
"=====================================================================
|
|
" Fonctions
|
|
"=====================================================================
|
|
function A_askFile(text) abort
|
|
call inputsave()
|
|
let g:Filename = input(a:text, "", "file")
|
|
call inputrestore()
|
|
endfunction
|
|
|
|
runtime config/shorcuts.vim
|
|
|