projects
/
grml-etc-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
zshrc: Remove old reverse-menu-complete binding
[grml-etc-core.git]
/
etc
/
zsh
/
zshrc
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
68acd4e
..
23d938a
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-596,7
+596,7
@@
typeset -U path cdpath fpath manpath
# Load a few modules
is4 && \
# Load a few modules
is4 && \
-for mod in complist deltochar mathfunc ; do
+for mod in
parameter
complist deltochar mathfunc ; do
zmodload -i zsh/${mod} 2>/dev/null || print "Notice: no ${mod} available :("
done
zmodload -i zsh/${mod} 2>/dev/null || print "Notice: no ${mod} available :("
done
@@
-1040,15
+1040,14
@@
zleiab() {
LBUFFER+=${abk[$MATCH]:-$MATCH}
}
LBUFFER+=${abk[$MATCH]:-$MATCH}
}
-zle -N zleiab
&& bindkey ",." zleiab ## KEYB!
+zle -N zleiab
help-show-abk()
{
zle -M "$(print "Type ,. after these abbreviations to expand them:"; print -a -C 2 ${(kv)abk})"
}
help-show-abk()
{
zle -M "$(print "Type ,. after these abbreviations to expand them:"; print -a -C 2 ${(kv)abk})"
}
-#k# Display list of abbreviations that expand when followed by ,.
-zle -N help-show-abk && bindkey '^xb' help-show-abk ## KEYB!
+zle -N help-show-abk
# press "ctrl-e d" to insert the actual date in the form yyyy-mm-dd
insert-datestamp() { LBUFFER+=${(%):-'%D{%Y-%m-%d}'}; }
# press "ctrl-e d" to insert the actual date in the form yyyy-mm-dd
insert-datestamp() { LBUFFER+=${(%):-'%D{%Y-%m-%d}'}; }
@@
-1128,7
+1127,7
@@
inplaceMkDirs() {
}
#k# mkdir -p <dir> from string under cursor or marked area
}
#k# mkdir -p <dir> from string under cursor or marked area
-zle -N inplaceMkDirs
&& bindkey '^xM' inplaceMkDirs ## KEYB!
+zle -N inplaceMkDirs
#v1# set number of lines to display per page
HELP_LINES_PER_PAGE=20
#v1# set number of lines to display per page
HELP_LINES_PER_PAGE=20
@@
-1249,8
+1248,7
@@
help-zle()
help_zle_sln=$((help_zle_sln + HELP_LINES_PER_PAGE))
zle -M "${(F)help_zle_lines[sln,help_zle_sln-1]}"
}
help_zle_sln=$((help_zle_sln + HELP_LINES_PER_PAGE))
zle -M "${(F)help_zle_lines[sln,help_zle_sln-1]}"
}
-#k# display help for keybindings and ZLE
-zle -N help-zle && bindkey '^xz' help-zle # note: cycle pages with consecutive use of '^xz' ## KEYB!
+zle -N help-zle
## complete word from currently visible Screen or Tmux buffer.
if check_com -c screen || check_com -c tmux; then
## complete word from currently visible Screen or Tmux buffer.
if check_com -c screen || check_com -c tmux; then
@@
-1292,7
+1290,7
@@
function zrcautozle() {
}
function zrcgotwidget() {
}
function zrcgotwidget() {
- (( ${+widgets[$
i
]} ))
+ (( ${+widgets[$
1
]} ))
}
function zrcgotkeymap() {
}
function zrcgotkeymap() {
@@
-1315,7
+1313,7
@@
zstyle ':completion:hist-complete:*' completer _history
typeset -ga grml_missing_features
function zrcbindkey() {
typeset -ga grml_missing_features
function zrcbindkey() {
- if (( ARGC
&& ${+widgets[${argv[-1]}]} ))
; then
+ if (( ARGC
)) && zrcgotwidget ${argv[-1]}
; then
bindkey "$@"
fi
}
bindkey "$@"
fi
}
@@
-1394,6
+1392,7
@@
bind2maps viins vicmd -- Right vi-forward-char
bind2maps viins vicmd -- Right vi-forward-char
if zrcgotkeymap menuselect; then
bind2maps viins vicmd -- Right vi-forward-char
if zrcgotkeymap menuselect; then
+ #m# k Shift-tab Perform backwards menu completion
bind2maps menuselect -- BackTab reverse-menu-complete
#k# menu selection: pick item but stay in the menu
bind2maps menuselect -- BackTab reverse-menu-complete
#k# menu selection: pick item but stay in the menu
@@
-1408,6
+1407,13
@@
if zrcgotkeymap menuselect; then
zrcbindkey -M menuselect '^o' accept-and-infer-next-history
fi
zrcbindkey -M menuselect '^o' accept-and-infer-next-history
fi
+#k# Display list of abbreviations that expand when followed by ,.
+zrcbindkey ",." zleiab
+zrcbindkey '^xb' help-show-abk
+zrcbindkey '^xM' inplaceMkDirs
+#k# display help for keybindings and ZLE
+zrcbindkey '^xz' help-zle
+
#k# Insert files and test globbing
zrcbindkey "^xf" insert-files # C-x-f
#k# Insert files and test globbing
zrcbindkey "^xf" insert-files # C-x-f
@@
-1438,13
+1444,6
@@
zrcbindkey "\e[6~" history-beginning-search-forward-end # PageDown
#k# Insert Unicode character
zrcbindkey '^xi' insert-unicode-char
#k# Insert Unicode character
zrcbindkey '^xi' insert-unicode-char
-#m# k Shift-tab Perform backwards menu completion
-if [[ -n "$terminfo[kcbt]" ]]; then
- zrcbindkey "$terminfo[kcbt]" reverse-menu-complete
-elif [[ -n "$terminfo[cbt]" ]]; then # required for GNU screen
- zrcbindkey "$terminfo[cbt]" reverse-menu-complete
-fi
-
#k# Toggle abbreviation expansion on/off
zrcbindkey '^xA' grml_toggle_abbrev
zrcbindkey "^x^h" commit-to-history
#k# Toggle abbreviation expansion on/off
zrcbindkey '^xA' grml_toggle_abbrev
zrcbindkey "^x^h" commit-to-history