You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

35 lines
922 B

vim9script
# Create config directory
if !isdirectory('~/.config/vim')
:silent !mkdir -p ~/.config/vim > /dev/null 2>&1
endif
# Create cache directory
if !isdirectory('~/.cache/vim')
:silent !mkdir -p ~/.cache/vim > /dev/null 2>&1
endif
# Setup paths
set viminfo+=n~/.cache/vim/info
# set runtimepath+=n~/.config/vim/autoload
set runtimepath=~/.config/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.config/vim/after
## Backups
if !isdirectory('~./.cache/vim/backup')
:silent !mkdir -p ~/.cache/vim/backup > /dev/null 2>&1
endif
set backupdir=~/.cache/vim/backup//,.
set backup # enable backups
## Swap
if !isdirectory('~./.cache/vim/swap')
:silent !mkdir -p ~/.cache/vim/swap > /dev/null 2>&1
endif
set directory=~/.cache/vim/swap//,.
## Undo files
if !isdirectory('~/.cache/vim/undo')
:silent !mkdir -p ~/.cache/vim/undo > /dev/null 2>&1
endif
set undodir=~/.cache/vim/undo//,.
set undofile