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.

72 lines
1.7 KiB
VimL

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

" Activation de vim-pathogen pour linstallation de plugins
execute pathogen#infect()
"Plugin pour rust
"rustfmt à chaque sauvegarde
let g:rustfmt_autosave = 1
" Appliquer automatiquement les modifications de ~/.vimrc
if has("autocmd")
autocmd! bufwritepost .vimrc source ~/.vimrc
endif
if !empty(system("setxkbmap -print|grep bepo"))
source ~/.vimrc.bepo
endif
" Visualise les tabs
set list
set listchars=tab:▸ 
" [Esc] sur Tab
"" Tab fait un Esc, Maj+Tab fait un Tab
inoremap <Tab> <Esc>
inoremap &lt;S-Tab> <Tab>
"" Même chose, mais en mode visuel
vnoremap <Tab> <Esc>
vnoremap &lt;S-Tab> <Tab>
" encodage et coloration syntaxique
set encoding=utf-8
set fileencoding=utf-8
syntax on
set number "affiche les numéros de ligne
set relativenumber "affiche les numéros de ligne (relatif)
" python ident
filetype indent plugin on
set autoindent
set modeline
" Maintain undo history between sessions
set undofile
if ($XDG_DATA_HOME != '')
silent !mkdir $XDG_DATA_HOME/vim/undodir -p > /dev/null 2>&1
set undodir=$XDG_DATA_HOME/vim/undodir
else
if ($HOME != '')
silent !mkdir $HOME/.local/share/vim/undodir -p > /dev/null 2>&1
set undodir=$HOME/.local/share/vim/undodir
else
echo "Error: environment variable $HOME not set"
endif
endif
if &term =~ "xterm\\|rxvt"
" use an orange cursor in insert mode
let &t_SI = "\<Esc>]12;orange\x7"
" use a red cursor otherwise
let &t_EI = "\<Esc>]12;red\x7"
silent !echo -ne "\033]12;red\007"
" reset cursor when vim exits
autocmd VimLeave * silent !echo -ne "\033]112\007"
" use \003]12;gray\007 for gnome-terminal and rxvt up to version 9.21
endif
" Colorise les nbsp
colorscheme koehler
highlight NbSp ctermbg=lightgray guibg=lightred
match NbSp /\%xa0/