# HG changeset patch # User nanaya # Date 1738575295 -32400 # Node ID 2b011294810229910451d0c1f2bac98c48d30be0 # Parent 3b001c615c36f2f12f81e3c6c85042f83da61909 [vim] better viminfo location diff -r 3b001c615c36 -r 2b0112948102 rc/vimrc --- a/rc/vimrc Mon Feb 03 18:28:41 2025 +0900 +++ b/rc/vimrc Mon Feb 03 18:34:55 2025 +0900 @@ -153,7 +153,7 @@ if has('autocmd') "Restore cursor position - set viminfo='50,\"1000,<1000,:100,%,h,n~/.viminfo + set viminfo='50,\"1000,<1000,:100,%,h,n~/.local/state/vim/viminfo function! ResCur() if line("'\"") <= line("$") normal! g`" diff -r 3b001c615c36 -r 2b0112948102 setup --- a/setup Mon Feb 03 18:28:41 2025 +0900 +++ b/setup Mon Feb 03 18:34:55 2025 +0900 @@ -133,8 +133,10 @@ test "${1}" = "uninstall" && return shift - touch "${@}" - _echo "Ensured existence of ${*}" + _target="${HOME}/${1}" + mkdir -p "${_target%/*}" + touch "${_target}" + _echo "Ensured existence of ${_target}" } _vim_x() { @@ -210,15 +212,16 @@ _rc "${1}" "gitconfig" ".config/git/config" _rc "${1}" "gitignore_global" ".config/git/ignore" _rc "${1}" "hgrc" ".config/hg/hgrc" - _touch "${1}" "${HOME}/.config/hg/hgrc.local" + _touch "${1}" ".config/hg/hgrc.local" _rc "${1}" "hgignore_global" ".config/hg/ignore" - _touch "${1}" "${HOME}/.config/hg/ignore.local" + _touch "${1}" ".config/hg/ignore.local" _rc "${1}" "editrc" ".editrc" _rc "${1}" "inputrc" ".inputrc" _rc "${1}" "tmux.conf" ".config/tmux/tmux.conf" _vim_x "${1}" syntax _vim_packs "${1}" _rc "${1}" "vimrc" ".vim/vimrc" + _touch "${1}" ".local/state/vim/viminfo" _rc "${1}" "irbrc" ".config/irb/irbrc" ;; *)