general stuff about display and save

This commit is contained in:
Mathieu Maret 2015-07-07 13:21:26 +02:00
parent 3d0533181e
commit 0d5117e608
1 changed files with 57 additions and 0 deletions

57
.vimrc
View File

@ -1,3 +1,60 @@
"""""""""""
" GENERAL "
"""""""""""
" disable vi-compatible mode
set nocompatible
filetype plugin on
syntax on
""""""""
" SAVE "
""""""""
" disable backup
set nobackup
" save before compilation
set autowrite
" jump to last known position when reopening a file
if has("autocmd")
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ execute "normal! g`\"" |
\ endif
endif
" command line history
set history=50
" Check that file have not been changed
" CursorHold : after cursor move
" WinEnter or BufWinEnter
au WinEnter * checktime
au BufWinEnter * checktime
"""""""""""
" DISPLAY "
"""""""""""
" highlight the cursor line
set cursorline
" show the status line
set laststatus=2
" show the cursor position
set ruler
" show mode
set showmode
" display incomplete commands
set showcmd
" display line number"
set number
" always display status line
set laststatus=2
" show bad white spaces
let c_space_errors = 1
let python_space_error_highlight = 1
highlight link cSpaceError SpaceError
highlight link pythonSpaceError SpaceError
highlight SpaceError ctermfg=235 cterm=reverse
"""""""""
" Plugin"
"""""""""