globalias.plugin.zsh 376 B

1234567891011121314151617
  1. globalias() {
  2. zle _expand_alias
  3. zle expand-word
  4. zle self-insert
  5. }
  6. zle -N globalias
  7. # space expands all aliases, including global
  8. bindkey -M emacs " " globalias
  9. bindkey -M viins " " globalias
  10. # control-space to make a normal space
  11. bindkey -M emacs "^ " magic-space
  12. bindkey -M viins "^ " magic-space
  13. # normal space during searches
  14. bindkey -M isearch " " magic-space