added creation of the swapfile directory if not exist
+ and set explicit config for backspace to work in i mode
This commit is contained in:
@@ -16,6 +16,9 @@ set ignorecase
|
|||||||
" Do smart case matching
|
" Do smart case matching
|
||||||
set smartcase
|
set smartcase
|
||||||
|
|
||||||
|
" set the backspace key to
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
|
||||||
" Incremental search
|
" Incremental search
|
||||||
"set incsearch
|
"set incsearch
|
||||||
|
|
||||||
@@ -31,16 +34,16 @@ set hidden
|
|||||||
" turns on syntax hilighting
|
" turns on syntax hilighting
|
||||||
syntax on
|
syntax on
|
||||||
|
|
||||||
" use coloration 'torte'
|
" use coloration 'torte' or other
|
||||||
" and specify no coloration in the background
|
" and specify no coloration in the background
|
||||||
colo elflord
|
colo elflord
|
||||||
highlight Normal ctermbg=NONE
|
highlight Normal ctermbg=NONE
|
||||||
highlight nonText ctermbg=NONE
|
highlight nonText ctermbg=NONE
|
||||||
|
|
||||||
" show existing tab with 4 spaces width
|
" show existing tab with x spaces width
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
|
|
||||||
" when indenting with '>', use 4 spaces width
|
" when indenting with '>', use x spaces width
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
|
|
||||||
" indent new line like the previous one
|
" indent new line like the previous one
|
||||||
@@ -150,10 +153,16 @@ inoremap <Up> <C-o>gk
|
|||||||
" put swap files in a special directory
|
" put swap files in a special directory
|
||||||
"---------------------------------------------------------------
|
"---------------------------------------------------------------
|
||||||
|
|
||||||
" directory indique a vim où mettre les swap files a la place du
|
" first create the needed directory
|
||||||
" dossier courrant, le double slash demande a vim de donner au
|
" https://stackoverflow.com/questions/1549263/how-can-i-create-a-folder-if-it-doesnt-exist-from-vimrc
|
||||||
" swap file un nom avec son chemin d'acces pour eviter que deux
|
|
||||||
" fichiers du meme noms posent un probleme
|
silent !mkdir -p ~/.vim/swapfiles
|
||||||
|
|
||||||
|
" 'directory' tells vim where to put the swap files, instead of
|
||||||
|
" putting them in the current directory
|
||||||
|
" the double slash '//' ask vim to give to the swap file a name
|
||||||
|
" with its complete path, to avoid problems whene two files have
|
||||||
|
" the same name
|
||||||
|
|
||||||
set directory=~/.vim/swapfiles//
|
set directory=~/.vim/swapfiles//
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user