diff options
author | Hsieh Chin Fan <typebrook@gmail.com> | 2022-02-06 16:12:57 +0800 |
---|---|---|
committer | Hsieh Chin Fan <typebrook@gmail.com> | 2022-02-06 16:12:57 +0800 |
commit | fd14ddb04a2eee567fc234ed77ef4d8c07cf496e (patch) | |
tree | dac770467ae9d535f285989dfae1cfba42985f8b | |
parent | 1f55ff59d7b50bfb659fa3e81cd9b627a1c3c807 (diff) |
update
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | alias | 5 | ||||
-rwxr-xr-x | tools/install.sh | 1 | ||||
-rw-r--r-- | zsh/_ww.sh (renamed from zsh/_wg.zsh) | 6 |
4 files changed, 10 insertions, 8 deletions
@@ -1,7 +1,7 @@ | |||
1 | .ONESHELL: | 1 | .ONESHELL: |
2 | .PHONY: * | 2 | .PHONY: * |
3 | 3 | ||
4 | all: git vim tig gpg | 4 | all: git tig vim tig gpg |
5 | mkdir -p ~/git | 5 | mkdir -p ~/git |
6 | 6 | ||
7 | git: | 7 | git: |
@@ -19,8 +19,7 @@ vim: | |||
19 | fi | 19 | fi |
20 | # vim-plug | 20 | # vim-plug |
21 | curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | 21 | curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |
22 | rm -f ~/.vim_runtime/my_configs.vim | 22 | ln -sf `pwd`/vimrc ~/.vim_runtime/my_configs.vim |
23 | ln -s `pwd`/vimrc ~/.vim_runtime/my_configs.vim | ||
24 | 23 | ||
25 | zsh: | 24 | zsh: |
26 | curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | bash | 25 | curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | bash |
@@ -71,4 +70,3 @@ pass: | |||
71 | if [ ! -d "$(HOME)/.password-store" ]; then | 70 | if [ ! -d "$(HOME)/.password-store" ]; then |
72 | git clone ssh://topo/~/.password-store ~/.password-store; | 71 | git clone ssh://topo/~/.password-store ~/.password-store; |
73 | fi | 72 | fi |
74 | |||
@@ -202,9 +202,12 @@ cdss() { | |||
202 | # about vimwiki | 202 | # about vimwiki |
203 | alias cdw='cd ~/vimwiki' | 203 | alias cdw='cd ~/vimwiki' |
204 | alias chw='cd ~/vimwiki && tig --all' | 204 | alias chw='cd ~/vimwiki && tig --all' |
205 | wg() { | 205 | ww() { |
206 | vim ~/vimwiki/${1%%.md}.md | 206 | vim ~/vimwiki/${1%%.md}.md |
207 | } | 207 | } |
208 | wg() { | ||
209 | grep -r "$@" ~/vimwiki | ||
210 | } | ||
208 | wi() { | 211 | wi() { |
209 | cat ~/vimwiki/${1%%.md}.md | 212 | cat ~/vimwiki/${1%%.md}.md |
210 | } | 213 | } |
diff --git a/tools/install.sh b/tools/install.sh index 2e265fa..86f13aa 100755 --- a/tools/install.sh +++ b/tools/install.sh | |||
@@ -19,6 +19,7 @@ fi | |||
19 | # Write initial commands into .bashrc or .zshrc | 19 | # Write initial commands into .bashrc or .zshrc |
20 | sed -i'.bak' "\^# $REPO^, /^$/ d" $RCFILE | 20 | sed -i'.bak' "\^# $REPO^, /^$/ d" $RCFILE |
21 | cat >>$RCFILE <<EOF | 21 | cat >>$RCFILE <<EOF |
22 | |||
22 | # $REPO | 23 | # $REPO |
23 | export SETTING_DIR=$SETTING_DIR | 24 | export SETTING_DIR=$SETTING_DIR |
24 | source \$SETTING_DIR/tools/init/load-settings.sh | 25 | source \$SETTING_DIR/tools/init/load-settings.sh |
@@ -1,7 +1,7 @@ | |||
1 | #compdef wg | 1 | #compdef ww |
2 | 2 | ||
3 | function _wg() { | 3 | function _ww() { |
4 | compadd -S '' $(cd ~/vimwiki && ls ${words[2]}*) | 4 | compadd -S '' $(cd ~/vimwiki && ls ${words[2]}*) |
5 | } | 5 | } |
6 | 6 | ||
7 | _wg | 7 | _ww |