summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/history-substring-search/README7
-rw-r--r--plugins/history-substring-search/README.markdown7
-rw-r--r--plugins/osx/osx.plugin.zsh1
-rw-r--r--plugins/perl/perl.plugin.zsh8
-rw-r--r--plugins/vi-mode/vi-mode.plugin.zsh14
5 files changed, 19 insertions, 18 deletions
diff --git a/plugins/history-substring-search/README b/plugins/history-substring-search/README
deleted file mode 100644
index be11adf76..000000000
--- a/plugins/history-substring-search/README
+++ /dev/null
@@ -1,7 +0,0 @@
-To activate this script, load it into an interactive ZSH session:
-
- % source history-substring-search.zsh
-
-See the "history-substring-search.zsh" file for more information:
-
- % sed -n '2,/^$/s/^#//p' history-substring-search.zsh | more
diff --git a/plugins/history-substring-search/README.markdown b/plugins/history-substring-search/README.markdown
new file mode 100644
index 000000000..143b813a1
--- /dev/null
+++ b/plugins/history-substring-search/README.markdown
@@ -0,0 +1,7 @@
+To activate this script, please include it the `plugins` variable within `~/.zshrc`
+
+ `plugins=(git history-substring-search.zsh)`
+
+See the "history-substring-search.zsh" file for more information:
+
+ `sed -n '2,/^$/s/^#//p' history-substring-search.zsh | more`
diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
index d366f1fc8..d0f9f009a 100644
--- a/plugins/osx/osx.plugin.zsh
+++ b/plugins/osx/osx.plugin.zsh
@@ -35,6 +35,7 @@ EOF
set current_session to current session
tell current_session
write text "${command}"
+ keystroke return
end tell
end tell
end tell
diff --git a/plugins/perl/perl.plugin.zsh b/plugins/perl/perl.plugin.zsh
index f94c4195d..1fbf7c122 100644
--- a/plugins/perl/perl.plugin.zsh
+++ b/plugins/perl/perl.plugin.zsh
@@ -27,7 +27,7 @@ alias latest-perl='curl -s http://www.perl.org/get.html | perl -wlne '\''if (/pe
# Functions #################################################################
-# newpl - creates a basic Perl script file and opens it with $EDITOR
+# newpl - creates a basic Perl script file and opens it with $EDITOR
newpl () {
# set $EDITOR to 'vim' if it is undefined
[[ -z $EDITOR ]] && EDITOR=vim
@@ -54,9 +54,3 @@ pgs() { # [find] [replace] [filename]
prep() { # [pattern] [filename unless STDOUT]
perl -nle 'print if /'"$1"'/;' $2
}
-
-# say - append a newline to 'print'
-say() {
- print "$1\n"
-}
-
diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
index f2745b409..4424bb29a 100644
--- a/plugins/vi-mode/vi-mode.plugin.zsh
+++ b/plugins/vi-mode/vi-mode.plugin.zsh
@@ -16,10 +16,7 @@ function zle-keymap-select zle-line-init zle-line-finish {
# Ensure that the prompt is redrawn when the terminal size changes.
TRAPWINCH() {
- if [[ -o zle ]]; then
- zle reset-prompt
- zle -R
- fi
+ zle && { zle reset-prompt; zle -R }
}
zle -N zle-line-init
@@ -34,6 +31,15 @@ bindkey -v
autoload -Uz edit-command-line
bindkey -M vicmd 'v' edit-command-line
+# allow ctrl-p, ctrl-n for navigate history (standard behaviour)
+bindkey '^P' up-history
+bindkey '^N' down-history
+
+# allow ctrl-h, ctrl-w, ctrl-? for char and word deletion (standard behaviour)
+bindkey '^?' backward-delete-char
+bindkey '^h' backward-delete-char
+bindkey '^w' backward-kill-word
+
# if mode indicator wasn't setup by theme, define default
if [[ "$MODE_INDICATOR" == "" ]]; then
MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}"