From fd14ddb04a2eee567fc234ed77ef4d8c07cf496e Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sun, 6 Feb 2022 16:12:57 +0800 Subject: update --- Makefile | 6 ++---- alias | 5 ++++- tools/install.sh | 1 + zsh/_wg.zsh | 7 ------- zsh/_ww.sh | 7 +++++++ 5 files changed, 14 insertions(+), 12 deletions(-) delete mode 100644 zsh/_wg.zsh create mode 100644 zsh/_ww.sh diff --git a/Makefile b/Makefile index e3c1d6c..d0f1e67 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .ONESHELL: .PHONY: * -all: git vim tig gpg +all: git tig vim tig gpg mkdir -p ~/git git: @@ -19,8 +19,7 @@ vim: fi # vim-plug curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - rm -f ~/.vim_runtime/my_configs.vim - ln -s `pwd`/vimrc ~/.vim_runtime/my_configs.vim + ln -sf `pwd`/vimrc ~/.vim_runtime/my_configs.vim zsh: curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | bash @@ -71,4 +70,3 @@ pass: if [ ! -d "$(HOME)/.password-store" ]; then git clone ssh://topo/~/.password-store ~/.password-store; fi - diff --git a/alias b/alias index d5c9562..210aae2 100644 --- a/alias +++ b/alias @@ -202,9 +202,12 @@ cdss() { # about vimwiki alias cdw='cd ~/vimwiki' alias chw='cd ~/vimwiki && tig --all' -wg() { +ww() { vim ~/vimwiki/${1%%.md}.md } +wg() { + grep -r "$@" ~/vimwiki +} wi() { cat ~/vimwiki/${1%%.md}.md } 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 # Write initial commands into .bashrc or .zshrc sed -i'.bak' "\^# $REPO^, /^$/ d" $RCFILE cat >>$RCFILE <