aboutsummaryrefslogtreecommitdiff
path: root/options.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2019-11-16 16:16:01 +0800
committerGitHub <noreply@github.com>2019-11-16 16:16:01 +0800
commit98bb1cc8acafaf6d8ebd341d12d78c13605bb09a (patch)
tree639b2557e710e0ce059caf34ae313ca00918cfce /options.vim
parent29eb7e6ff3f4db21e99f607f4e6b745b564f7bc9 (diff)
Update backup settings
Diffstat (limited to 'options.vim')
-rw-r--r--options.vim9
1 files changed, 8 insertions, 1 deletions
diff --git a/options.vim b/options.vim
index 4661390..86b219d 100644
--- a/options.vim
+++ b/options.vim
@@ -23,6 +23,13 @@ set clipboard+=unnamedplus
" Disable creating swapfiles, see https://goo.gl/FA6m6h
set noswapfile
+" Set up backup directory
+let g:backupdir=expand(stdpath('data') . '/backup')
+if !isdirectory(g:backupdir)
+ call mkdir(g:backupdir, "p")
+endif
+let &backupdir=g:backupdir
+
" General tab settings
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
@@ -61,7 +68,7 @@ set scrolloff=3
" Use mouse to select and resize windows, etc.
if has('mouse')
- set mouse=niv " Enable mouse in several mode
+ set mouse=nv " Enable mouse in several mode
set mousemodel=popup " Set the behaviour of mouse
endif