globalias.plugin.zsh 298 Bytes
Newer Older
slavaGanzin's avatar
slavaGanzin committed
1
2
3
4
5
6
globalias() {
   zle _expand_alias
   zle expand-word
   zle self-insert
}
zle -N globalias
slavaGanzin's avatar
slavaGanzin committed
7
8
9
10
11
12
13
14

# space expands all global aliases
bindkey -M emacs " " globalias
bindkey -M viins " " globalias

# control-space to make a normal space
bindkey -M emacs "^ " magic-space
bindkey -M viins "^ " magic-space