Fixed an error in vim setup.
This commit is contained in:
parent
d2feaecae1
commit
1330f08cbb
@ -1,21 +1,21 @@
|
||||
set undodir=$XDG_DATA_HOME/vim/undo
|
||||
set directory=$XDG_DATA_HOME/vim/swap
|
||||
set backupdir=$XDG_DATA_HOME/vim/backup
|
||||
set viewdir=$XDG_DATA_HOME/vim/view
|
||||
set viminfo+='1000,n$XDG_DATA_HOME/vim/viminfo
|
||||
set undodir=${VIMDOTDIR}/undo
|
||||
set directory=${VIMDOTDIR}/swap
|
||||
set backupdir=${VIMDOTDIR}/backup
|
||||
set viewdir=${VIMDOTDIR}/view
|
||||
set viminfo+='1000,n${VIMDOTDIR}/viminfo
|
||||
set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
|
||||
|
||||
|
||||
" Install vim-plug
|
||||
if empty(glob('$XDG_DATA_HOME/vim/autoload/plug.vim'))
|
||||
silent !curl -fLo $XDG_DATA_HOME/vim/autoload/plug.vim --create-dirs
|
||||
if empty(glob('${VIMDOTDIR}/autoload/plug.vim'))
|
||||
silent !curl -fLo ${VIMDOTDIR}/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
autocmd VimEnter * PlugInstall --sync | source $VIMRC
|
||||
endif
|
||||
|
||||
" Specify a directory for plugins
|
||||
" Install plugins
|
||||
call plug#begin('$XDG_DATA_HOME/vim/plugged')
|
||||
call plug#begin('$VIMDOTDIR/plugged')
|
||||
|
||||
Plug 'elzr/vim-json'
|
||||
Plug 'arcticicestudio/nord-vim'
|
||||
|
@ -18,4 +18,5 @@ NPM_PACKAGES="${HOME}/.npm-packages"
|
||||
export MANPATH="${MANPATH-$(manpath)}:$NPM_PACKAGES/share/man"
|
||||
|
||||
## Use vimrc fom XDG config home
|
||||
export VIMINIT='source "$XDG_CONFIG_HOME/vim/vimrc"'
|
||||
export VIMDOTDIR="$XDG_CONFIG_HOME/vim"
|
||||
export VIMINIT='let $VIMRC="$VIMDOTDIR/vimrc" | source $VIMRC'
|
2
.zshenv
2
.zshenv
@ -2,6 +2,8 @@
|
||||
|
||||
# Set up XDG environment
|
||||
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:=${HOME}/.config}
|
||||
export XDG_CACHE_HOME=${XDG_CACHE_HOME:=${HOME}/.cache}
|
||||
export XDG_DATA_HOME=${XDG_DATA_HOME:=${HOME}/.local/share}
|
||||
|
||||
# Where to look for zsh config
|
||||
export ZDOTDIR=${ZDOTDIR:=${XDG_CONFIG_HOME}/zsh}
|
||||
|
Loading…
Reference in New Issue
Block a user