diff options
| author | nsfisis <nsfisis@gmail.com> | 2021-11-19 22:52:15 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2021-11-19 22:52:15 +0900 |
| commit | 5e4213ac2beda9bf15713e3c52988a100bc39386 (patch) | |
| tree | 75b1055da1766144080826ad86d343ff39a19218 | |
| parent | 5afa37ff96dbb0b6bd1ed25836fe7bbdf3bd85a4 (diff) | |
| download | dotfiles-5e4213ac2beda9bf15713e3c52988a100bc39386.tar.gz dotfiles-5e4213ac2beda9bf15713e3c52988a100bc39386.tar.zst dotfiles-5e4213ac2beda9bf15713e3c52988a100bc39386.zip | |
vim: refactor
| -rw-r--r-- | .vimrc | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -33,25 +33,26 @@ else endif if empty($XDG_CONFIG_HOME) - let g:MY_ENV.xdg_config_home = $HOME . '/.config' + let g:MY_ENV.config_home = $HOME . '/.config' else - let g:MY_ENV.xdg_config_home = $XDG_CONFIG_HOME + let g:MY_ENV.config_home = $XDG_CONFIG_HOME endif if empty($XDG_CACHE_HOME) - let g:MY_ENV.xdg_cache_home = $HOME . '/.cache' + let g:MY_ENV.cache_home = $HOME . '/.cache' else - let g:MY_ENV.xdg_cache_home = $XDG_CONFIG_HOME + let g:MY_ENV.cache_home = $XDG_CONFIG_HOME endif -let g:MY_ENV.vim_dir = g:MY_ENV.xdg_config_home . '/vim' -let g:MY_ENV.my_dir = g:MY_ENV.vim_dir . '/my' -let g:MY_ENV.plug_dir = g:MY_ENV.vim_dir . '/plugged' -let g:MY_ENV.cache_dir = g:MY_ENV.xdg_cache_home . '/vim' +let g:MY_ENV.config_dir = g:MY_ENV.config_home . '/vim' +let g:MY_ENV.cache_dir = g:MY_ENV.cache_home . '/vim' + +let g:MY_ENV.my_dir = g:MY_ENV.config_dir . '/my' +let g:MY_ENV.plug_dir = g:MY_ENV.config_dir . '/plugged' let g:MY_ENV.undo_dir = g:MY_ENV.cache_dir . '/undo' let g:MY_ENV.backup_dir = g:MY_ENV.cache_dir . '/backup' let g:MY_ENV.swap_dir = g:MY_ENV.cache_dir . '/swap' let g:MY_ENV.yankround_dir = g:MY_ENV.cache_dir . '/yankround' -let g:MY_ENV.skk_dir = g:MY_ENV.xdg_config_home . '/skk' +let g:MY_ENV.skk_dir = g:MY_ENV.config_home . '/skk' for [s:k, s:v] in items(g:MY_ENV) if s:k =~# '_dir$' && !isdirectory(s:v) @@ -391,7 +392,7 @@ let &viminfo .= ',n' . g:MY_ENV.cache_dir . '/viminfo' " === BEGIN === {{{2 -execute 'set runtimepath+=' . g:MY_ENV.vim_dir +execute 'set runtimepath+=' . g:MY_ENV.config_dir call plug#begin(g:MY_ENV.plug_dir) |
