diff --git a/.zshrc b/.zshrc index 33d37ec..1d4ad54 100644 --- a/.zshrc +++ b/.zshrc @@ -2,6 +2,7 @@ # export PATH=$HOME/bin:/usr/local/bin:$PATH export EDITOR=vim +export TERM="screen-256color" bindkey -e export JAVA_HOME=/usr/local/jdk1.8.0_131/ @@ -12,8 +13,6 @@ export PATH="$NODE_HOME/bin/:$PATH" export PATH="$PATH:$HOME/phabricator/arcanist/bin/" -export TERM="screen-256color" - # pyenv export PATH="$HOME/.pyenv/bin:$PATH" eval "$(pyenv init -)" @@ -116,4 +115,3 @@ source $ZSH/oh-my-zsh.sh # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" -# bindkey '^m' autosuggest-accept diff --git a/install.sh b/install.sh index 90213cb..3ebe974 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,15 @@ #!/bin/bash VIMDIR=${1:-$HOME} +# install ctags to solve "Exuberant ctags not found in PATH" error +sudo apt-get install -y zsh +chsh -s $(which zsh) +sudo apt-get install -y exuberant-ctags +sudo apt-get install -y vim vim-gtk tmux + +sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" + + echo "start install, all of your old .vimrc and .vim will be overwritten." echo "all your old vim settings will be mv to .vimrc.old & .vim.old" echo -en "Do you want to continue?[y/n]" @@ -27,10 +36,3 @@ fi sudo apt-get install -y git git submodule init && git submodule update -# install ctags to solve "Exuberant ctags not found in PATH" error -sudo apt-get install -y exuberant-ctags -sudo apt-get install -y vim -sudo apt-get install -y tmux - -sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" - diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 40fac56..df2aac5 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -8,12 +8,14 @@ set -s focus-events on #unbind ^b # unbind defaul prefix Control+b #set -g prefix 'C-\' # bind new prefix Control+a #bind-key 'C-\' send-prefix - -bind r source-file ~/.tmux.conf \; display-message "tmux config reloaded" # create new short cut to reload tmux.conf +set -g prefix2 C-a +bind C-a send-prefix -2 set -q -g status-utf8 on setw -q -g utf8 on +bind r source-file ~/.tmux.conf \; display-message "tmux config reloaded" # create new short cut to reload tmux.conf + set -g history-limit 5000 # boost history # ---- display ------------------------------------------------------------------------ @@ -28,19 +30,19 @@ setw -g pane-base-index 1 # make pane numbering consistent with windows setw -g automatic-rename on # rename window to reflect current program set -g renumber-windows on # renumber windows when a window is closed +set -g set-titles on # 监视窗口信息,如有内容变动,进行提示 set -g monitor-activity on set -g visual-activity off # 调节窗口大小快捷键 +# bind -r 表示可以重复 bind -r H resize-pane -L 5 bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5 - - # move between panels using hjkl like in vim up #bind-key k select-pane -U #down @@ -59,8 +61,10 @@ bind -r L resize-pane -R 5 # bind -n M-Down select-pane -D # split panes using | and - +bind \ split-window -h -c "#{pane_current_path}" bind | split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" +bind _ split-window -v -c "#{pane_current_path}" unbind '"' unbind %