1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

vim: correctly use XDG dirs

This commit is contained in:
Joe Groocock 2018-04-12 02:51:32 +01:00
parent b512bace44
commit e09e7105dd
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86
2 changed files with 7 additions and 6 deletions

View File

@ -1,10 +1,11 @@
set nocompatible " be iMproved, required set nocompatible " be iMproved, required
" Reconfigure Vim to be clean! " Reconfigure Vim to be clean!
set rtp+=~/.config/vim set undodir=$XDG_CACHE_HOME/vim/undo
set directory=.,~/.config/vim set directory=$XDG_CACHE_HOME/vim/swap
set viminfo+=n~/.config/vim/viminfo set backupdir=$XDG_CACHE_HOME/vim/backup
set directory=$HOME/.config/vim/swapfiles// set viminfo+='1000,n$XDG_CACHE_HOME/vim/viminfo
set runtimepath+=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
syntax enable syntax enable
filetype plugin on filetype plugin on

View File

@ -18,8 +18,8 @@ export PATH="${PATH}:$DOTFILES/scripts"
# Allow Vim to load from ~/.config/vim # Allow Vim to load from ~/.config/vim
export VIMDIR="$XDG_CONFIG_HOME/vim" export VIMDIR="$XDG_CONFIG_HOME/vim"
export MYVIMRC="$VIMDIR/vimrc" export VIMRC="$VIMDIR/vimrc"
export VIMINIT=":so $MYVIMRC" export VIMINIT=":so $VIMRC"
export EDITOR="vim" export EDITOR="vim"
export VISUAL="vim" export VISUAL="vim"