From c32fdc3542cea38ae476012b01af9f5e2926cb6b Mon Sep 17 00:00:00 2001 From: Rotem Yaari Date: Thu, 26 Jan 2012 22:25:51 +0200 Subject: [PATCH 1/4] Add dircycle plugin: enables cycling through the directory stack --- plugins/dircycle/dircycle.plugin.zsh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 plugins/dircycle/dircycle.plugin.zsh diff --git a/plugins/dircycle/dircycle.plugin.zsh b/plugins/dircycle/dircycle.plugin.zsh new file mode 100644 index 000000000..46a0ab268 --- /dev/null +++ b/plugins/dircycle/dircycle.plugin.zsh @@ -0,0 +1,10 @@ +## +# dircycle plugin: enables cycling through the directory +# stack using Ctrl+Shift+Left/Right + +eval "insert-cycledleft () { zle push-line; LBUFFER='pushd -q +1'; zle accept-line }" +zle -N insert-cycledleft +bindkey "\e[1;6D" insert-cycledleft +eval "insert-cycledright () { zle push-line; LBUFFER='pushd -q -0'; zle accept-line }" +zle -N insert-cycledright +bindkey "\e[1;6C" insert-cycledright From 1da3f3a8a822cfbf64d7e8c4775923453c2d0a7e Mon Sep 17 00:00:00 2001 From: Rotem Yaari Date: Thu, 26 Jan 2012 22:26:58 +0200 Subject: [PATCH 2/4] Add Function keys plugin: enables easy binding of function keys --- .../function_keys/function_keys.plugin.zsh | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 plugins/function_keys/function_keys.plugin.zsh diff --git a/plugins/function_keys/function_keys.plugin.zsh b/plugins/function_keys/function_keys.plugin.zsh new file mode 100644 index 000000000..52656d65e --- /dev/null +++ b/plugins/function_keys/function_keys.plugin.zsh @@ -0,0 +1,94 @@ +## +# function keys plugin: defines easy hooks you can implement or override +# to respond to F1-F12 keys + +#F1 +eval "f1() {zle push-line;LBUFFER+='fkey_f1';zle accept-line}" +zle -N f1 +bindkey '^[OP' f1 +#F2 +eval "f2() {zle push-line;LBUFFER+='fkey_f2';zle accept-line}" +zle -N f2 +bindkey '^[OQ' f2 +#F3 +eval "f3() {zle push-line;LBUFFER+='fkey_f3';zle accept-line}" +zle -N f3 +bindkey '^[OR' f3 +#F4 +eval "f4() {zle push-line;LBUFFER+='fkey_f4';zle accept-line}" +zle -N f4 +bindkey '^[OS' f4 +#F5 +eval "f5() {zle push-line;LBUFFER+='fkey_f5';zle accept-line}" +zle -N f5 +bindkey '^[[15~' f5 +#F6 +eval "f6() {zle push-line;LBUFFER+='fkey_f6';zle accept-line}" +zle -N f6 +bindkey '^[[17~' f6 +#F7 +eval "f7() {zle push-line;LBUFFER+='fkey_f7';zle accept-line}" +zle -N f7 +bindkey '^[[18~' f7 +#F8 +eval "f8() {zle push-line;LBUFFER+='fkey_f8';zle accept-line}" +zle -N f8 +bindkey '^[[19~' f8 +#F9 +eval "f9() {zle push-line;LBUFFER+='fkey_f9';zle accept-line}" +zle -N f9 +bindkey '^[[20~' f9 +#F10 +eval "f10() {zle push-line;LBUFFER+='fkey_f10';zle accept-line}" +zle -N f10 +bindkey '^[[21~' f10 +#F11 +eval "f11() {zle push-line;LBUFFER+='fkey_f11';zle accept-line}" +zle -N f11 +bindkey '^[[23~' f11 +#F12 +eval "f12() {zle push-line;LBUFFER+='fkey_f12';zle accept-line}" +zle -N f12 +bindkey '^[[24~' f12 + +function fkey_f1 { + _undefined_fkey +} +function fkey_f2 { + _undefined_fkey +} +function fkey_f3 { + _undefined_fkey +} +function fkey_f4 { + _undefined_fkey +} +function fkey_f5 { + _undefined_fkey +} +function fkey_f6 { + _undefined_fkey +} +function fkey_f7 { + _undefined_fkey +} +function fkey_f8 { + _undefined_fkey +} +function fkey_f9 { + _undefined_fkey +} +function fkey_f10 { + _undefined_fkey +} +function fkey_f11 { + _undefined_fkey +} +function fkey_f12 { + _undefined_fkey +} +function _undefined_fkey { + echo "Undefined key action" +} + + From e6ba24399909172556f37edccd0a05e6896f5dbd Mon Sep 17 00:00:00 2001 From: Rotem Yaari Date: Thu, 26 Jan 2012 22:27:47 +0200 Subject: [PATCH 3/4] Add virtualenvwrapper plugin: useful for python development --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh new file mode 100644 index 000000000..40ad5edfe --- /dev/null +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -0,0 +1,5 @@ +export VIRTUAL_ENV_DISABLE_PROMPT=1 + +source virtualenvwrapper.sh + +export RPROMPT="%{$fg_bold[white]%}(venv:\${VIRTUAL_ENV:t})%{$reset_color%}" \ No newline at end of file From abd2313bcca52b60d73f8ee4bad80fa09571520f Mon Sep 17 00:00:00 2001 From: Rotem Yaari Date: Thu, 26 Jan 2012 22:27:59 +0200 Subject: [PATCH 4/4] Add vmalloc theme --- themes/vmalloc.zsh-theme | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 themes/vmalloc.zsh-theme diff --git a/themes/vmalloc.zsh-theme b/themes/vmalloc.zsh-theme new file mode 100644 index 000000000..49c6dd099 --- /dev/null +++ b/themes/vmalloc.zsh-theme @@ -0,0 +1,7 @@ +PROMPT='%(?.%{$fg_bold[green]%}.%{$fg_bold[red]%})➜ %{$fg_bold[green]%}%p %{$fg[white]%}%c %{$fg_bold[black]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[black]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[black]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[black]%})" +