From e44fd9f3ecb251f6519f67f6b5856cd529ac476f Mon Sep 17 00:00:00 2001 From: humphreylin Date: Tue, 30 Jul 2019 03:10:25 +0000 Subject: add tmux and zshrc config --- .bashrc | 5 +++++ .tmux.conf | 18 ++++++++++++++++++ .zshrc | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 .tmux.conf create mode 100644 .zshrc diff --git a/.bashrc b/.bashrc index 7b277eb..c2c4cfa 100644 --- a/.bashrc +++ b/.bashrc @@ -116,10 +116,15 @@ if ! shopt -oq posix; then fi fi +# autojump +if [ ! -d /usr/share/autojump ]; then + sudo apt install autojump +fi . /usr/share/autojump/autojump.sh # proxy export http_proxy='http://localhost:8118' export https_proxy='http://localhost:8118' +# fzf [ -f ~/.fzf.bash ] && source ~/.fzf.bash diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..9f28f2e --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,18 @@ +# modify the prefix +unbind ^b +set -g prefix 'C-a' + +# swtich between pane +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# resize the pane +# bind h resize-pane -L 10 +# bind l resize-pane -R 10 +# bind k resize-pane -U 5 +# bind j resize-pane -D 5 + +# color of tmux +set -g default-terminal "screen-256color" diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..05bc400 --- /dev/null +++ b/.zshrc @@ -0,0 +1,40 @@ +setopt histignorealldups sharehistory + +# Use emacs keybindings even if our EDITOR is set to vi +bindkey -e + +# Keep 1000 lines of history within the shell and save it to ~/.zsh_history: +HISTSIZE=1000 +SAVEHIST=1000 +HISTFILE=~/.zsh_history + +# autojump +if [ ! -d /usr/share/autojump ]; then + echo 'Installing autojump ... ' + sudo apt install autojump +fi +. /usr/share/autojump/autojump.zsh + +# proxy +export http_proxy='http://127.0.0.1:8118' +export https_proxy='http://127.0.0.1:8118' + +# zplug +if [ ! -d ~/.zplug ]; then + echo 'Installing zplug ... ' + git clone git@github.com:zplug/zplug.git ~/.zplug +fi +source ~/.zplug/init.zsh +zplug "zsh-users/zsh-completions" +zplug "zsh-users/zsh-syntax-highlighting" +zplug "dracula/zsh", as:theme +if ! zplug check --verbose; then + printf "Install? [y/N]: " + if read -q; then + echo; zplug install + fi +fi +zplug load --verbose + +# fzf +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh -- cgit v1.2.3