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
|
||||
set smartcase
|
||||
|
||||
" set the backspace key to
|
||||
set backspace=indent,eol,start
|
||||
|
||||
" Incremental search
|
||||
"set incsearch
|
||||
|
||||
@@ -31,16 +34,16 @@ set hidden
|
||||
" turns on syntax hilighting
|
||||
syntax on
|
||||
|
||||
" use coloration 'torte'
|
||||
" use coloration 'torte' or other
|
||||
" and specify no coloration in the background
|
||||
colo elflord
|
||||
highlight Normal ctermbg=NONE
|
||||
highlight nonText ctermbg=NONE
|
||||
|
||||
" show existing tab with 4 spaces width
|
||||
" show existing tab with x spaces width
|
||||
set tabstop=2
|
||||
|
||||
" when indenting with '>', use 4 spaces width
|
||||
" when indenting with '>', use x spaces width
|
||||
set shiftwidth=2
|
||||
|
||||
" indent new line like the previous one
|
||||
@@ -150,10 +153,16 @@ inoremap <Up> <C-o>gk
|
||||
" put swap files in a special directory
|
||||
"---------------------------------------------------------------
|
||||
|
||||
" directory indique a vim où mettre les swap files a la place du
|
||||
" dossier courrant, le double slash demande a vim de donner au
|
||||
" swap file un nom avec son chemin d'acces pour eviter que deux
|
||||
" fichiers du meme noms posent un probleme
|
||||
" first create the needed directory
|
||||
" https://stackoverflow.com/questions/1549263/how-can-i-create-a-folder-if-it-doesnt-exist-from-vimrc
|
||||
|
||||
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//
|
||||
|
||||
|
||||
Reference in New Issue
Block a user