summaryrefslogtreecommitdiff
path: root/plugins/sudo
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sudo')
-rw-r--r--plugins/sudo/README.md4
-rw-r--r--plugins/sudo/sudo.plugin.zsh4
2 files changed, 5 insertions, 3 deletions
diff --git a/plugins/sudo/README.md b/plugins/sudo/README.md
index ebfdfd10d..25eb85829 100644
--- a/plugins/sudo/README.md
+++ b/plugins/sudo/README.md
@@ -13,10 +13,10 @@ Easily prefix your current or previous commands with `sudo` by pressing <kbd>esc
)
```
-2. Reload the source file or restart your Terminal session:
+2. Restart your shell or restart your Terminal session:
```console
- $ source ~/.zshrc
+ $ exec zsh
$
```
diff --git a/plugins/sudo/sudo.plugin.zsh b/plugins/sudo/sudo.plugin.zsh
index 0b843822e..f405b025f 100644
--- a/plugins/sudo/sudo.plugin.zsh
+++ b/plugins/sudo/sudo.plugin.zsh
@@ -28,4 +28,6 @@ sudo-command-line() {
}
zle -N sudo-command-line
# Defined shortcut keys: [Esc] [Esc]
-bindkey "\e\e" sudo-command-line
+bindkey -M emacs '\e\e' sudo-command-line
+bindkey -M vicmd '\e\e' sudo-command-line
+bindkey -M viins '\e\e' sudo-command-line