Salut!
Alors il existe des trucs exprès en fait, voir ici par exemple : vim-fr.org/index.php/Python
Mais tu as déja lu à mon avis.
Voici par exemple mon .vimrc, grandement inspiré de ci-dessus: (je garde que les parties pour python)
[code]set scrolloff=1000 " curseur au milieu
au bufNewFile *.py 0r ~/.vim/templates/python " charger un modèle
autocmd BufWritePre,FileWritePre *.py ks|call DerModif()|'s
autocmd BufRead,BufNewFile *.py syntax on
autocmd BufRead,BufNewFile *.py set ai
autocmd BufEnter *.py set smartindent cinwords=if,elif,else,for,while,with,try,except,finally,def,class
autocmd BufEnter *.py set omnifunc=pythoncomplete#Complete
autocmd BufEnter *.py setlocal tabstop=4
autocmd BufEnter *.py setlocal shiftwidth=4
autocmd BufEnter *.py setlocal expandtab
autocmd BufEnter *.py map :!python %
au BufRead *.py set tw=72
map “:match ErrorMsg ‘%>80v.+’”
fun CreaFichPython()
execute("r! echo \"\\# -*- coding:Utf-8 -*- \"")
execute("r! echo \"\\# Fichier: \"%")
execute("r! echo \"\\# Cree le \"".strftime("%d %b %Y %X"))
execute("r! echo \"\\# Derniere modification: \"".strftime("%d %b %Y %X"))
endfun[/code]
Je dois avouer que comme c’es tpioché un peu partout, ce n’est pas très propre… 