From 11662a6ec5194ac7dc21c0fdb65e518ecdc242b0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 2 Aug 2013 16:23:37 -0400 Subject: [PATCH] Improve zsh vi-mode --- README.md | 4 ++++ zsh/config | 4 ++++ zsh/prompt | 7 ++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7dbb3bfc..1b4e3f4c 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,7 @@ My mac and debian/ubuntu dotfiles. Yes. They bite. + +## ZSH + +![My ZSH Prompt](https://dl.dropboxusercontent.com/u/2908279/public/zsh.png) diff --git a/zsh/config b/zsh/config index 2fa9205f..a55bcaab 100644 --- a/zsh/config +++ b/zsh/config @@ -46,4 +46,8 @@ COMPLETION_WAITING_DOTS="true" zle -N edit-command-line bindkey '^f' edit-command-line +bindkey '^w' backward-kill-word +bindkey '^a' beginning-of-line +bindkey '^e' end-of-line + # vim:set ft=zsh: diff --git a/zsh/prompt b/zsh/prompt index 31bf9af8..537abe6e 100644 --- a/zsh/prompt +++ b/zsh/prompt @@ -47,8 +47,8 @@ prompt() { # The prompt echo -n "%{$fg[red]%}" echo -n "%{$FX[bold]%}" - echo -n " \$ " - echo -n "%{$FX[no-bold]%}" + echo -n ' $ ' + echo -n "%{$reset_color%}" } @@ -66,7 +66,8 @@ rprompt() { echo -n "%{$reset_color%}" } -PROMPT="$(prompt)" +PROMPT=" +$(prompt)" RPROMPT="$(rprompt)" # vim:set ft=zsh: