From 1db5c2cbe394268c4092411234ba2ab55ab2200f Mon Sep 17 00:00:00 2001 From: Finbarr O'Callaghan Date: Fri, 13 Mar 2015 16:02:39 +0000 Subject: [PATCH] adding ealiases, changing some colours --- tmux.conf | 2 +- vimrc | 3 +++ zshrc | 33 +++++++++++++++++++++++++++++---- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/tmux.conf b/tmux.conf index c112fc3..6b86aad 100644 --- a/tmux.conf +++ b/tmux.conf @@ -43,7 +43,7 @@ set -g status-interval 10 set -g status-fg white set -g status-bg default -set -g status-left "#[fg=colour14]#(whoami)@#H #[fg=colour11]#S#[default]" +set -g status-left "#[fg=colour8]#(whoami)@#H #[fg=colour11] #S #[default]" set -g status-right "#[fg=white] #(date "+%-d/%-m/%y") #[fg=colour14]%H:%M:%S #[default]" set -g status-left-length 100 diff --git a/vimrc b/vimrc index 991b48a..3b9a0ab 100644 --- a/vimrc +++ b/vimrc @@ -141,6 +141,7 @@ endfunction nnoremap dw :call TrimWhiteSpace() + " Space to toggle folds. nmap za vmap za @@ -153,11 +154,13 @@ nmap v :so ~/.vimrc nmap p :set invpaste:set paste? nmap nu :set nu! nmap ul :t.\|s/./=/g\|set nohls +nmap n :set invnumber nmap bd :bd:bn noremap c a + "}}} ""bundles/plugins etc.. -----------------------------------------------------{{{ diff --git a/zshrc b/zshrc index fab3602..2fa941f 100644 --- a/zshrc +++ b/zshrc @@ -1,7 +1,7 @@ #.zshrc -pri_color='yellow' -sec_color='blue' +pri_color='black' +sec_color='yellow' #LANG="en_IE.utf8" #LC_ALL="en_IE.utf8" @@ -166,14 +166,39 @@ compdef _git gco=git-checkout return_code="%(?..%B%F{$pri_color}[%F{red}%?%F{$pri_color}]%f)" -if [ -f ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then - source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +ealiases=() + +function ealias() +{ +alias $1 +ealiases+=(${1%%\=*}) +} + +function expand-ealias() +{ +if [[ $LBUFFER =~ "(^|[;|&])\s*(${(j:|:)ealiases})\$" ]]; then + zle _expand_alias + zle expand-word fi +zle magic-space +} + +zle -N expand-ealias + +bindkey -M viins ' ' expand-ealias +bindkey -M viins '^ ' magic-space # control-space to bypass completion +bindkey -M isearch " " magic-space # normal space during searches + if [ -f ~/.zshrc.local ]; then source ~/.zshrc.local fi +if [ -f ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then + source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +fi + + if [ -f ~/.zsh/zsh_functions ]; then source ~/.zsh/zsh_functions fi