diff --git a/modules/prompt/functions/prompt_psomasundar_setup b/modules/prompt/functions/prompt_psomasundar_setup new file mode 100644 index 0000000000..d086062ec8 --- /dev/null +++ b/modules/prompt/functions/prompt_psomasundar_setup @@ -0,0 +1,56 @@ +function prompt_wikimatze_precmd { + git-info +} + +function prompt_wikimatze_setup { + setopt LOCAL_OPTIONS + unsetopt XTRACE KSH_ARRAYS + prompt_opts=(cr percent subst) + + # Load required functions. + autoload -Uz add-zsh-hook + + # Add hook for calling git-info before each command. + add-zsh-hook precmd prompt_wikimatze_precmd + + # Use extended color pallete if available. + if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then + _prompt_mseri_colors=( + "%F{81}" # Turquoise + "%F{75}" # Pastel Cyan + "%F{215}" # Light Orange + "%F{166}" # Orange - not used + "%F{119}" # Pastel Limegreen + ) + else + _prompt_mseri_colors=( + "%F{cyan}" + "%F{magenta}" + "%F{yellow}" + "%F{red}" + "%F{green}" + ) + fi + + # Set git-info parameters. + zstyle ':prezto:module:git:info' verbose 'yes' + zstyle ':prezto:module:git:info:ahead' format ' %%B%F{yellow}⬆%f%%b' + zstyle ':prezto:module:git:info:behind' format ' %%B%F{yellow}⬇%f%%b' + zstyle ':prezto:module:git:info:branch' format '%F{green}%b%f' + zstyle ':prezto:module:git:info:stashed' format ' %%B%F{cyan}✭%f%%b' + + zstyle ':prezto:module:git:info:clean' format ' %F{green}✔%f' + zstyle ':prezto:module:git:info:dirty' format ' %F{red}✗%f' + zstyle ':prezto:module:git:info:untracked' format ' %%B%F{white}◼%f%%b' + + zstyle ':prezto:module:git:info:keys' format \ + 'prompt' ' %F{green}(%f$(coalesce "%b" "%p" "%c")${git_info[rprompt]}%s%F{green})%f' \ + 'rprompt' '%A%B%S%C%D%U%u' + + # Define prompts. + PROMPT="${_prompt_mseri_colors[3]}%n%f@${_prompt_mseri_colors[2]}%m%f ${_prompt_mseri_colors[5]}%~%f"'${(e)git_info[prompt]}'" » " + RPROMPT='' + +} + +prompt_wikimatze_setup "$@" diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index c109155565..84074215d8 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' @@ -33,8 +33,10 @@ zstyle ':prezto:load' pmodule \ 'history' \ 'directory' \ 'spectrum' \ - 'utility' \ 'completion' \ + 'git' \ + 'syntax-highlighting' \ + 'history-substring-search' \ 'prompt' # @@ -57,7 +59,10 @@ 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' +# Get history searches back +bindkey "^r" history-incremental-search-backward +bindkey "^s" history-incremental-search-forward # Auto convert .... to ../.. # zstyle ':prezto:module:editor' dot-expansion 'yes' @@ -113,7 +118,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 'psomasundar' # Set the working directory prompt display length. # By default, it is set to 'short'. Set it to 'long' (without '~' expansion) diff --git a/runcoms/zprofile b/runcoms/zprofile index acd774254c..66eba8681a 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' # @@ -44,6 +44,9 @@ typeset -gU cdpath fpath mailpath path # Set the list of directories that Zsh searches for programs. path=( /usr/local/{bin,sbin} + /usr/local/heroku/bin + $HOME/.rvm/bin + $HOME/.cabal/bin $path ) diff --git a/runcoms/zshenv b/runcoms/zshenv index 2dbf12a8bf..cfc150ccf7 100644 --- a/runcoms/zshenv +++ b/runcoms/zshenv @@ -9,3 +9,8 @@ if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then source "${ZDOTDIR:-$HOME}/.zprofile" fi + +if [[ $TERM == xterm-termite ]]; then + . /etc/profile.d/vte.sh + __vte_osc7 +fi diff --git a/runcoms/zshrc b/runcoms/zshrc index 039b882d88..35722e82d6 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -11,3 +11,13 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then fi # Customize to your needs... +alias ls='ls --color=auto -h --group-directories-first' +alias sml='rlwrap sml' +alias ocaml='rlwrap ocaml' +alias ocamldebug='ocamldebug \`ocamlfind query -recursive -i-format batteries\` -I _build' +alias term='urxvt -cd `pwd` &' +alias grep='egrep --color=auto' + +bindkey "^r" history-incremental-search-backward +bindkey "^s" history-incremental-search-forward +. /home/prasanth/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true