let g:termdebug_wide=1 " Splitte en mode vertical Termdebug

set hlsearch           " Surligne les resultats de recherche

set incsearch          " highlight search as you type

"set nowrap            " Pas de retour a la ligne auto (affichage)

set showmatch          " Affiche parenthese correspondante

set autoindent         " Indentation automatique

set smartindent        " as above

set tabstop=3          " number of spaces in a tab

set softtabstop=3      " Largeur d'une tabulation

set shiftwidth=3       " Largeur de l'indentation

" :call Tabset(3)"
function! Tabset(n)
    exec ("set tabstop=".a:n)
    exec ("set softtabstop=".a:n)
    exec ("set shiftwidth=".a:n)
endfunction

:map <F2> <Esc>:call Tabset(2)

:map <F3> <Esc>:call Tabset(3)

:map <F4> <Esc>:call Tabset(4)

set expandtab         " Utilise des espaces plutôt que le caractère tabulation

set backspace=indent,eol,start " allow backspace in insert mode

set showcmd           " show incomplete commands

set history=100       " lines of command history

set ignorecase		    " Do case insensitive matching
set smartcase		      " Do smart case matching

set nowrapscan

set autowrite		      " Automatically save before commands like :next and :make

set hidden            " Hide buffers when they are abandoned

set mouse=a		        " Enable mouse usage (all modes)

set showmode

"set textwidth=80

set viminfo='500,\"10000,n~/.viminfo

" Supprime les espaces en fin de ligne avant de sauver
autocmd BufWrite * silent! %s/[\r \t]\+$//

" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif

" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
if has("autocmd")
  filetype plugin indent on
endif

syntax on             " Coloration syntaxique
"colorscheme desert " set up a color scheme in the gvim interface
"let mywinfont="Monospace:h15:cANSI"

" Quand un fichier est changÃ© en dehors de Vim, il est relu automatiquement
set autoread

" Aucun son ou affichage lors des erreurs
set errorbells
set novisualbell
set t_vb=

" Afficher la position du curseur
set ruler


 "set keywordprg=
 "set mouse=a
 "set mousehide
 "set mousemodel=popup_setpos
 "set formatoptions=orc
 " set fdm=indent        " Repli selon l'indentation
 "set path=.,/usr/include,/usr/local/include
 "set smartcase
 "set smarttab
 "set wildchar=9
 "set wildignore+=*.class,*.pyc
 "set wildmenu
 "set cursorline
 "highlight CursorLine guibg=#001000

 " keep a copy of last edit
 " if this throws errors, make sure the backup dir exists
 "set backup
 "set backupdir=~/.vim/backup/

 "set list " affiche les caracteres louches
 "set tabpagemax=15



 "map ² $
 "vmap ² $
 "cmap ² $
