From 4179d387fa2b5a1f1075a39090a91ccf0ccc9a52 Mon Sep 17 00:00:00 2001 From: Chao Luan Date: Tue, 11 Jul 2017 10:56:38 +1000 Subject: [PATCH] Update with own settings --- runcoms/zpreztorc | 47 ++++++++++++++++++++++++----------------------- runcoms/zprofile | 8 ++++++-- runcoms/zshenv | 4 ++++ runcoms/zshrc | 13 +++++++++++++ 4 files changed, 47 insertions(+), 25 deletions(-) diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index a54907344c8..0bdb61da101 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -10,7 +10,7 @@ # # Set case-sensitivity for completion, history lookup, etc. -# zstyle ':prezto:*:*' case-sensitive 'yes' +zstyle ':prezto:*:*' case-sensitive 'yes' # Color output (auto set to 'no' on dumb terminals). zstyle ':prezto:*:*' color 'yes' @@ -19,10 +19,10 @@ zstyle ':prezto:*:*' color 'yes' # zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib # Set the Zsh modules to load (man zshmodules). -# zstyle ':prezto:load' zmodule 'attr' 'stat' +zstyle ':prezto:load' zmodule 'attr' 'stat' # Set the Zsh functions to load (man zshcontrib). -# zstyle ':prezto:load' zfunction 'zargs' 'zmv' +zstyle ':prezto:load' zfunction 'zargs' 'zmv' # Set the Prezto modules to load (browse modules). # The order matters. @@ -35,14 +35,15 @@ zstyle ':prezto:load' pmodule \ 'spectrum' \ 'utility' \ 'completion' \ - 'prompt' + 'prompt' \ + 'git' + -# # Autosuggestions # # Set the query found color. -# zstyle ':prezto:module:autosuggestions:color' found '' +zstyle ':prezto:module:autosuggestions:color' found '' # # Completions @@ -57,7 +58,7 @@ zstyle ':prezto:load' pmodule \ # # Set the key mapping style to 'emacs' or 'vi'. -zstyle ':prezto:module:editor' key-bindings 'emacs' +zstyle ':prezto:module:editor' key-bindings 'vi' # Auto convert .... to ../.. # zstyle ':prezto:module:editor' dot-expansion 'yes' @@ -70,7 +71,7 @@ zstyle ':prezto:module:editor' key-bindings 'emacs' # # Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'. -# zstyle ':prezto:module:git:status:ignore' submodules 'all' +zstyle ':prezto:module:git:status:ignore' submodules 'all' # # GNU Utility @@ -84,13 +85,13 @@ zstyle ':prezto:module:editor' key-bindings 'emacs' # # Set the query found color. -# zstyle ':prezto:module:history-substring-search:color' found '' +zstyle ':prezto:module:history-substring-search:color' found '' # Set the query not found color. -# zstyle ':prezto:module:history-substring-search:color' not-found '' +zstyle ':prezto:module:history-substring-search:color' not-found '' # Set the search globbing flags. -# zstyle ':prezto:module:history-substring-search' globbing-flags '' +zstyle ':prezto:module:history-substring-search' globbing-flags '' # # macOS @@ -113,7 +114,7 @@ zstyle ':prezto:module:editor' key-bindings 'emacs' # Set the prompt theme to load. # Setting it to 'random' loads a random theme. # Auto set to 'off' on dumb terminals. -zstyle ':prezto:module:prompt' theme 'sorin' +zstyle ':prezto:module:prompt' theme 'powerlevel9k' # Set the working directory prompt display length. # By default, it is set to 'short'. Set it to 'long' (without '~' expansion) @@ -129,10 +130,10 @@ zstyle ':prezto:module:prompt' theme 'sorin' # # Auto switch the Python virtualenv on directory change. -# zstyle ':prezto:module:python:virtualenv' auto-switch 'yes' +zstyle ':prezto:module:python:virtualenv' auto-switch 'yes' # Automatically initialize virtualenvwrapper if pre-requisites are met. -# zstyle ':prezto:module:python:virtualenv' initialize 'yes' +zstyle ':prezto:module:python:virtualenv' initialize 'yes' # # Ruby @@ -164,14 +165,14 @@ zstyle ':prezto:module:prompt' theme 'sorin' # Set syntax highlighters. # By default, only the main highlighter is enabled. -# zstyle ':prezto:module:syntax-highlighting' highlighters \ -# 'main' \ -# 'brackets' \ -# 'pattern' \ -# 'line' \ -# 'cursor' \ -# 'root' -# +zstyle ':prezto:module:syntax-highlighting' highlighters \ + 'main' \ + 'brackets' \ + 'pattern' \ + 'line' \ + 'cursor' \ + 'root' + # Set syntax highlighting styles. # zstyle ':prezto:module:syntax-highlighting' styles \ # 'builtin' 'bg=blue' \ @@ -187,7 +188,7 @@ zstyle ':prezto:module:prompt' theme 'sorin' # # Auto set the tab and window titles. -# zstyle ':prezto:module:terminal' auto-title 'yes' +zstyle ':prezto:module:terminal' auto-title 'yes' # Set the window title format. # zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' diff --git a/runcoms/zprofile b/runcoms/zprofile index acd774254c9..e90d0300314 100644 --- a/runcoms/zprofile +++ b/runcoms/zprofile @@ -17,8 +17,8 @@ fi # Editors # -export EDITOR='nano' -export VISUAL='nano' +export EDITOR='vim' +export VISUAL='vim' export PAGER='less' # @@ -45,6 +45,7 @@ typeset -gU cdpath fpath mailpath path path=( /usr/local/{bin,sbin} $path + $HOME/.local/bin ) # @@ -61,3 +62,6 @@ export LESS='-F -g -i -M -R -S -w -X -z-4' if (( $#commands[(i)lesspipe(|.sh)] )); then export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-" fi + +export WORKON_HOME="$HOME/.virtualenvs" + diff --git a/runcoms/zshenv b/runcoms/zshenv index 2dbf12a8bf7..ecd3899b14d 100644 --- a/runcoms/zshenv +++ b/runcoms/zshenv @@ -9,3 +9,7 @@ if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then source "${ZDOTDIR:-$HOME}/.zprofile" fi + +export PROJECT_HOME="$HOME/workspace" +export VIRTUALENVWRAPPER_VIRTUALENV="$HOME/.local/bin/virtualenvwrapper.sh" +export VIRTUALENVWRAPPER_SCRIPT="$VIRTUALENVWRAPPER_VIRTUALENV" diff --git a/runcoms/zshrc b/runcoms/zshrc index 039b882d880..90c8792c80b 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -4,10 +4,23 @@ # Authors: # Sorin Ionescu # +export TERM="xterm-256color" +unsetopt share_history + # Source Prezto. if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" fi +bindkey -v +bindkey '^R' history-incremental-pattern-search-backward + # Customize to your needs... +POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir virtualenv rbenv) +POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(vi_mode vcs root_indicator background_jobs) +POWERLEVEL9K_PROMPT_ON_NEWLINE=true +POWERLEVEL9K_SHORTEN_STRATEGY=truncate_from_right +unsetopt share_history + +eval "$(vex --shell-config zsh)"