X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fskel%2F.zshrc;h=323635004dc6468d7e42fbfcfa833b5ba5e365f6;hb=050227ae683e7b119f1f2a020afd9e49191460e4;hp=a090111d8fcf94c5f9e1149928f11f0b7577456a;hpb=9d8805145f33ab856da715b31cbf66a97ec9e0d1;p=grml-etc-core.git diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index a090111..3236350 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -82,6 +82,43 @@ alias -g V='| vim -' # }}} +## another approach for global aliases: cloning vim's abbreviation feature {{{ +# http://zshwiki.org/home/examples/zleiab +# typeset -A abbreviations +# abbreviations=( +# "Im" "| more" +# "Ia" "| awk" +# "Ig" "| grep" +# "Ieg" "| egrep" +# "Iag" "| agrep" +# "Igr" "| groff -s -p -t -e -Tlatin1 -mandoc" +# "Ip" "| $PAGER" +# "Ih" "| head" +# "Ik" "| keep" +# "It" "| tail" +# "Is" "| sort" +# "Iv" "| ${VISUAL:-${EDITOR}}" +# "Iw" "| wc" +# "Ix" "| xargs" +# ) +# +# magic-abbrev-expand() { +# local MATCH +# LBUFFER=${LBUFFER%%(#m)[_a-zA-Z0-9]#} +# LBUFFER+=${abbreviations[$MATCH]:-$MATCH} +# zle self-insert +# } +# +# no-magic-abbrev-expand() { +# LBUFFER+=' ' +# } +# +# zle -N magic-abbrev-expand +# zle -N no-magic-abbrev-expand +# bindkey " " magic-abbrev-expand +# bindkey "^x " no-magic-abbrev-expand +# }}} + ## aliases {{{ # Xterm resizing-fu.