aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.vimrc10
-rwxr-xr-xvim.sh1
2 files changed, 11 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index fd9d43c..72f4ee8 100644
--- a/.vimrc
+++ b/.vimrc
@@ -13,6 +13,7 @@ endif
" Enable a number column with numbers relative
" to the current line the cursor is on.
+set number
set relativenumber
" 1. Enable filetype detection to apply filetype-specific
@@ -43,6 +44,15 @@ set incsearch
" Show line/column number of cursor
set ruler
+" Setup home directory locations for vim temporary files
+if empty($XDG_STATE_HOME)
+ let $XDG_STATE_HOME = $HOME.'/.local/state'
+endif
+set backupdir=$XDG_STATE_HOME/vim/backup//
+set directory=$XDG_STATE_HOME/vim/swap//
+set undodir=$XDG_STATE_HOME/vim/undo//
+set undofile
+
" Enable the :Man command that ships with vim.
runtime ftplugin/man.vim
diff --git a/vim.sh b/vim.sh
index de4b151..54282cf 100755
--- a/vim.sh
+++ b/vim.sh
@@ -4,6 +4,7 @@ set -o nounset
main() {
git submodule update --init
+ mkdir -p $XDG_STATE_HOME/vim/{swap,backup,undo}
vim -u NONE -c "helptags ~/.vim/pack/plugins/start/vim-surround/doc" -c q
vim -u NONE -c "helptags ~/.vim/pack/plugins/start/fzf.vim/doc" -c q
vim -u NONE -c "helptags ~/.vim/pack/plugins/start/fzf/doc" -c q