aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.config/vim/my/after/ftplugin/c.vim (renamed from .vim/my/after/ftplugin/c.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/cmake.vim (renamed from .vim/my/after/ftplugin/cmake.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/cpp.vim (renamed from .vim/my/after/ftplugin/cpp.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/css.vim (renamed from .vim/my/after/ftplugin/css.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/gitcommit.vim (renamed from .vim/my/after/ftplugin/gitcommit.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/go.vim (renamed from .vim/my/after/ftplugin/go.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/haskell.vim (renamed from .vim/my/after/ftplugin/haskell.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/html.vim (renamed from .vim/my/after/ftplugin/html.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/javascript.vim (renamed from .vim/my/after/ftplugin/javascript.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/json.vim (renamed from .vim/my/after/ftplugin/json.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/lisp.vim (renamed from .vim/my/after/ftplugin/lisp.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/lua.vim (renamed from .vim/my/after/ftplugin/lua.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/markdown.vim (renamed from .vim/my/after/ftplugin/markdown.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/php.vim (renamed from .vim/my/after/ftplugin/php.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/python.vim (renamed from .vim/my/after/ftplugin/python.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/qf.vim (renamed from .vim/my/after/ftplugin/qf.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/ruby.vim (renamed from .vim/my/after/ftplugin/ruby.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/toml.vim (renamed from .vim/my/after/ftplugin/toml.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/typescript.vim (renamed from .vim/my/after/ftplugin/typescript.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/vim.vim (renamed from .vim/my/after/ftplugin/vim.vim)0
-rw-r--r--.config/vim/my/after/ftplugin/yaml.vim (renamed from .vim/my/after/ftplugin/yaml.vim)0
-rw-r--r--.config/vim/my/after/syntax/json.vim (renamed from .vim/my/after/syntax/json.vim)0
-rw-r--r--.config/vim/my/after/syntax/python.vim (renamed from .vim/my/after/syntax/python.vim)0
-rw-r--r--.config/vim/my/after/syntax/vim.vim (renamed from .vim/my/after/syntax/vim.vim)0
-rw-r--r--.config/vim/my/autoload/autosave.vim (renamed from .vim/my/autoload/autosave.vim)0
-rw-r--r--.config/vim/my/autoload/dummy.vim (renamed from .vim/my/autoload/dummy.vim)0
-rw-r--r--.config/vim/my/colors/ocean.vim (renamed from .vim/my/colors/ocean.vim)0
-rw-r--r--.config/vim/my/plugin/autosave.vim (renamed from .vim/my/plugin/autosave.vim)0
-rw-r--r--.config/vim/my/plugin/dummy.vim (renamed from .vim/my/plugin/dummy.vim)0
-rw-r--r--.config/vim/my/syntax/gitcommit.vim (renamed from .vim/my/syntax/gitcommit.vim)0
-rw-r--r--.gitignore4
-rw-r--r--.vimrc28
-rwxr-xr-xsetup.sh12
33 files changed, 26 insertions, 18 deletions
diff --git a/.vim/my/after/ftplugin/c.vim b/.config/vim/my/after/ftplugin/c.vim
index 12de33e..12de33e 100644
--- a/.vim/my/after/ftplugin/c.vim
+++ b/.config/vim/my/after/ftplugin/c.vim
diff --git a/.vim/my/after/ftplugin/cmake.vim b/.config/vim/my/after/ftplugin/cmake.vim
index b4f5591..b4f5591 100644
--- a/.vim/my/after/ftplugin/cmake.vim
+++ b/.config/vim/my/after/ftplugin/cmake.vim
diff --git a/.vim/my/after/ftplugin/cpp.vim b/.config/vim/my/after/ftplugin/cpp.vim
index 13c0374..13c0374 100644
--- a/.vim/my/after/ftplugin/cpp.vim
+++ b/.config/vim/my/after/ftplugin/cpp.vim
diff --git a/.vim/my/after/ftplugin/css.vim b/.config/vim/my/after/ftplugin/css.vim
index e4743e8..e4743e8 100644
--- a/.vim/my/after/ftplugin/css.vim
+++ b/.config/vim/my/after/ftplugin/css.vim
diff --git a/.vim/my/after/ftplugin/gitcommit.vim b/.config/vim/my/after/ftplugin/gitcommit.vim
index 915a193..915a193 100644
--- a/.vim/my/after/ftplugin/gitcommit.vim
+++ b/.config/vim/my/after/ftplugin/gitcommit.vim
diff --git a/.vim/my/after/ftplugin/go.vim b/.config/vim/my/after/ftplugin/go.vim
index 54aa34b..54aa34b 100644
--- a/.vim/my/after/ftplugin/go.vim
+++ b/.config/vim/my/after/ftplugin/go.vim
diff --git a/.vim/my/after/ftplugin/haskell.vim b/.config/vim/my/after/ftplugin/haskell.vim
index 676dcce..676dcce 100644
--- a/.vim/my/after/ftplugin/haskell.vim
+++ b/.config/vim/my/after/ftplugin/haskell.vim
diff --git a/.vim/my/after/ftplugin/html.vim b/.config/vim/my/after/ftplugin/html.vim
index a7b36ad..a7b36ad 100644
--- a/.vim/my/after/ftplugin/html.vim
+++ b/.config/vim/my/after/ftplugin/html.vim
diff --git a/.vim/my/after/ftplugin/javascript.vim b/.config/vim/my/after/ftplugin/javascript.vim
index a79e644..a79e644 100644
--- a/.vim/my/after/ftplugin/javascript.vim
+++ b/.config/vim/my/after/ftplugin/javascript.vim
diff --git a/.vim/my/after/ftplugin/json.vim b/.config/vim/my/after/ftplugin/json.vim
index 9886a95..9886a95 100644
--- a/.vim/my/after/ftplugin/json.vim
+++ b/.config/vim/my/after/ftplugin/json.vim
diff --git a/.vim/my/after/ftplugin/lisp.vim b/.config/vim/my/after/ftplugin/lisp.vim
index 13c1abc..13c1abc 100644
--- a/.vim/my/after/ftplugin/lisp.vim
+++ b/.config/vim/my/after/ftplugin/lisp.vim
diff --git a/.vim/my/after/ftplugin/lua.vim b/.config/vim/my/after/ftplugin/lua.vim
index d0eb8b2..d0eb8b2 100644
--- a/.vim/my/after/ftplugin/lua.vim
+++ b/.config/vim/my/after/ftplugin/lua.vim
diff --git a/.vim/my/after/ftplugin/markdown.vim b/.config/vim/my/after/ftplugin/markdown.vim
index 36791bc..36791bc 100644
--- a/.vim/my/after/ftplugin/markdown.vim
+++ b/.config/vim/my/after/ftplugin/markdown.vim
diff --git a/.vim/my/after/ftplugin/php.vim b/.config/vim/my/after/ftplugin/php.vim
index ec7fd3e..ec7fd3e 100644
--- a/.vim/my/after/ftplugin/php.vim
+++ b/.config/vim/my/after/ftplugin/php.vim
diff --git a/.vim/my/after/ftplugin/python.vim b/.config/vim/my/after/ftplugin/python.vim
index edeac06..edeac06 100644
--- a/.vim/my/after/ftplugin/python.vim
+++ b/.config/vim/my/after/ftplugin/python.vim
diff --git a/.vim/my/after/ftplugin/qf.vim b/.config/vim/my/after/ftplugin/qf.vim
index 364759c..364759c 100644
--- a/.vim/my/after/ftplugin/qf.vim
+++ b/.config/vim/my/after/ftplugin/qf.vim
diff --git a/.vim/my/after/ftplugin/ruby.vim b/.config/vim/my/after/ftplugin/ruby.vim
index 4d246e8..4d246e8 100644
--- a/.vim/my/after/ftplugin/ruby.vim
+++ b/.config/vim/my/after/ftplugin/ruby.vim
diff --git a/.vim/my/after/ftplugin/toml.vim b/.config/vim/my/after/ftplugin/toml.vim
index 84f6ca7..84f6ca7 100644
--- a/.vim/my/after/ftplugin/toml.vim
+++ b/.config/vim/my/after/ftplugin/toml.vim
diff --git a/.vim/my/after/ftplugin/typescript.vim b/.config/vim/my/after/ftplugin/typescript.vim
index cdb1674..cdb1674 100644
--- a/.vim/my/after/ftplugin/typescript.vim
+++ b/.config/vim/my/after/ftplugin/typescript.vim
diff --git a/.vim/my/after/ftplugin/vim.vim b/.config/vim/my/after/ftplugin/vim.vim
index 1ffa6a3..1ffa6a3 100644
--- a/.vim/my/after/ftplugin/vim.vim
+++ b/.config/vim/my/after/ftplugin/vim.vim
diff --git a/.vim/my/after/ftplugin/yaml.vim b/.config/vim/my/after/ftplugin/yaml.vim
index 5b4734e..5b4734e 100644
--- a/.vim/my/after/ftplugin/yaml.vim
+++ b/.config/vim/my/after/ftplugin/yaml.vim
diff --git a/.vim/my/after/syntax/json.vim b/.config/vim/my/after/syntax/json.vim
index 0d2651e..0d2651e 100644
--- a/.vim/my/after/syntax/json.vim
+++ b/.config/vim/my/after/syntax/json.vim
diff --git a/.vim/my/after/syntax/python.vim b/.config/vim/my/after/syntax/python.vim
index 834ab1f..834ab1f 100644
--- a/.vim/my/after/syntax/python.vim
+++ b/.config/vim/my/after/syntax/python.vim
diff --git a/.vim/my/after/syntax/vim.vim b/.config/vim/my/after/syntax/vim.vim
index a6b0d31..a6b0d31 100644
--- a/.vim/my/after/syntax/vim.vim
+++ b/.config/vim/my/after/syntax/vim.vim
diff --git a/.vim/my/autoload/autosave.vim b/.config/vim/my/autoload/autosave.vim
index 0c34d0e..0c34d0e 100644
--- a/.vim/my/autoload/autosave.vim
+++ b/.config/vim/my/autoload/autosave.vim
diff --git a/.vim/my/autoload/dummy.vim b/.config/vim/my/autoload/dummy.vim
index 3019bdf..3019bdf 100644
--- a/.vim/my/autoload/dummy.vim
+++ b/.config/vim/my/autoload/dummy.vim
diff --git a/.vim/my/colors/ocean.vim b/.config/vim/my/colors/ocean.vim
index f220740..f220740 100644
--- a/.vim/my/colors/ocean.vim
+++ b/.config/vim/my/colors/ocean.vim
diff --git a/.vim/my/plugin/autosave.vim b/.config/vim/my/plugin/autosave.vim
index 2548609..2548609 100644
--- a/.vim/my/plugin/autosave.vim
+++ b/.config/vim/my/plugin/autosave.vim
diff --git a/.vim/my/plugin/dummy.vim b/.config/vim/my/plugin/dummy.vim
index ce7b901..ce7b901 100644
--- a/.vim/my/plugin/dummy.vim
+++ b/.config/vim/my/plugin/dummy.vim
diff --git a/.vim/my/syntax/gitcommit.vim b/.config/vim/my/syntax/gitcommit.vim
index 14232a2..14232a2 100644
--- a/.vim/my/syntax/gitcommit.vim
+++ b/.config/vim/my/syntax/gitcommit.vim
diff --git a/.gitignore b/.gitignore
index bec3c6a..7702980 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-/.vim/*
-!/.vim/my/
+/.config/vim/*
+!/.config/vim/my/
/.config/emacs
vim-startup.log
diff --git a/.vimrc b/.vimrc
index 155bb77..28573c8 100644
--- a/.vimrc
+++ b/.vimrc
@@ -32,19 +32,26 @@ else
let g:MY_ENV.os = 'unknown'
endif
-let g:MY_ENV.vim_dir = !empty($XDG_CONFIG_HOME) ? expand('$XDG_CONFIG_HOME/vim') :
- \ g:MY_ENV.os ==# 'windows' ? expand('$HOME/vimfiles') :
- \ expand('$HOME/.vim')
+if empty($XDG_CONFIG_HOME)
+ let g:MY_ENV.xdg_config_home = $HOME . '/.config'
+else
+ let g:MY_ENV.xdg_config_home = $XDG_CONFIG_HOME
+endif
+if empty($XDG_CACHE_HOME)
+ let g:MY_ENV.xdg_cache_home = $HOME . '/.cache'
+else
+ let g:MY_ENV.xdg_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 = !empty($XDG_CACHE_HOME) ? expand('$XDG_CACHE_HOME/vim') :
- \ g:MY_ENV.vim_dir . '/cache'
-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.cache_dir = g:MY_ENV.xdg_cache_home . '/vim'
+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 = !empty($XDG_CONFIG_HOME) ? expand('$XDG_CONFIG_HOME/skk') :
- \ expand('$HOME/.config/skk')
+let g:MY_ENV.skk_dir = g:MY_ENV.xdg_config_home . '/skk'
for [s:k, s:v] in items(g:MY_ENV)
if s:k =~# '_dir$' && !isdirectory(s:v)
@@ -384,6 +391,7 @@ let &viminfo .= ',n' . g:MY_ENV.cache_dir . '/viminfo'
" === BEGIN === {{{2
+execute 'set runtimepath+=' . g:MY_ENV.vim_dir
call plug#begin(g:MY_ENV.plug_dir)
diff --git a/setup.sh b/setup.sh
index e12c174..28e6ae1 100755
--- a/setup.sh
+++ b/setup.sh
@@ -1,13 +1,7 @@
#!/bin/bash
-if [ ! -f ~/dotfiles/.vim/autoload/plug.vim ]; then
- echo "download: ~/dotfiles/.vim/autoload/plug.vim"
- curl -fLo ~/dotfiles/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
-fi
-
for name in \
.tmux.conf \
- .vim \
.vimrc \
.zshrc \
; \
@@ -28,6 +22,7 @@ for name in \
bat \
emacs \
git \
+ vim \
; \
do
if [ ! -L ~/.config/"$name" ]; then
@@ -36,6 +31,11 @@ do
fi
done
+if [ ! -f ~/dotfiles/.config/vim/autoload/plug.vim ]; then
+ echo "download: ~/dotfiles/.config/vim/autoload/plug.vim"
+ curl -fLo ~/dotfiles/.config/vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
+fi
+
if [ ! -d ~/.config/skk ]; then
echo "dir: ~/.config/skk"
mkdir ~/.config/skk