From 6c0e55563b7ae36b8d3b5fa81d731cbcf9db4312 Mon Sep 17 00:00:00 2001 From: Humphrey Lin Date: Thu, 26 Nov 2020 12:50:22 +0800 Subject: Add wsl2 config and emacs config --- .zshrc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index 70c1b22..c3b1f01 100644 --- a/.zshrc +++ b/.zshrc @@ -8,11 +8,6 @@ HISTSIZE=1000 SAVEHIST=1000 HISTFILE=~/.zsh_history -export EDITOR=/usr/bin/vim -[ -f /usr/local/bin/mvim ] && \ - export EDITOR='/usr/local/bin/mvim -v' \ - alias vim='mvim -v' - # file [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh @@ -27,9 +22,6 @@ export no_proxy=localhost,127.0.0.1 case `uname` in Darwin) # commands for macOS - export PATH="/usr/local/opt/openjdk/bin:$PATH" - export CPPFLAGS="-I/usr/local/opt/openjdk/include" - [ -d $HOME/.gem ] && export GEM_HOME="$HOME/.gem" ;; Linux) # commands for Linux @@ -39,10 +31,18 @@ FreeBSD) ;; esac +# WSL 2 +if [[ `uname -a` =~ "microsoft" ]]; then + export hostip=$(cat /etc/resolv.conf | grep -oP '(?<=nameserver\ ).*') + export http_proxy="socks5://${hostip}:7890" + export https_proxy="socks5://${hostip}:7890" + export all_proxy="socks5://${hostip}:7890" +fi + # zplug if [ ! -d ~/.zplug ]; then echo 'Installing zplug ... ' - git clone git@github.com:zplug/zplug.git ~/.zplug + git clone https://github.com/zplug/zplug.git ~/.zplug fi source ~/.zplug/init.zsh zplug "plugins/git", from:oh-my-zsh -- cgit v1.2.3 From 514eab77de4da4b9ffb4c411d81729d04e55588f Mon Sep 17 00:00:00 2001 From: Humphrey Lin Date: Tue, 1 Dec 2020 18:10:09 +0000 Subject: Add config of i3wm and modify the EDITOR in .zshrc --- .zshrc | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index c3b1f01..b9b1bbf 100644 --- a/.zshrc +++ b/.zshrc @@ -3,6 +3,8 @@ setopt histignorealldups sharehistory # Use emacs keybindings even if our EDITOR is set to vi bindkey -e +EDITOR=vim + # Keep 1000 lines of history within the shell and save it to ~/.zsh_history: HISTSIZE=1000 SAVEHIST=1000 @@ -10,6 +12,7 @@ HISTFILE=~/.zsh_history # file [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +[[ -s /etc/profile.d/autojump.sh ]] && source /etc/profile.d/autojump.sh [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh # proxy @@ -48,6 +51,7 @@ source ~/.zplug/init.zsh zplug "plugins/git", from:oh-my-zsh zplug "zsh-users/zsh-completions" zplug "zsh-users/zsh-syntax-highlighting" +zplug "zsh-users/zsh-autosuggestions" zplug "dracula/zsh", as:theme if ! zplug check --verbose; then printf "Install? [y/N]: " -- cgit v1.2.3