[vim] Move vim config files to vim directory

Vim now also supports XDG_CONFIG_HOME for its config files. So use that.
This commit is contained in:
Eryn Wells 2026-02-07 18:38:04 -08:00
parent c1fb9721bf
commit 50b0c20c89
4 changed files with 6 additions and 3 deletions

27
vimrc
View file

@ -1,27 +0,0 @@
" ~/.vimrc
" Eryn Wells <eryn@erynwells.me>
source ~/.vimrc.common
if !has('nvim')
set nocompatible " use enhanced vim features
let s:localdir=expand("~/.local/state/vim")
if !isdirectory(s:localdir)
call mkdir(s:localdir, "p")
endif
let &backupdir=expand(s:localdir . "/backup//" . ",.")
let &undodir=expand(s:localdir . "/undo//")
let &viminfofile=expand(s:localdir . "/viminfo")
" Shada data. Parameters as follows: (see :help shada)
" % number of buffers to save and restore when no file argument is given
" ' maximum number of previously edited files for which marks are remembered
" h disable highlighted search patterns on start
" / omitted, so all search history is saved
" < maximum number of lines saved for each register
" : maximum number of lines of command history to save
" s shada entries over 100 KiB are skipped
set viminfo=%100,'100,h,<1000,:100,s100
endif