Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
08cc808d
Commit
08cc808d
authored
May 09, 2020
by
Marc Cornellà
Browse files
magic-enter: define bindkey for vi mode as well
Closes #8906
parent
b8761985
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/magic-enter/magic-enter.plugin.zsh
View file @
08cc808d
...
...
@@ -3,7 +3,6 @@
# Pressing enter in a git directory runs `git status`
# in other directories `ls`
magic-enter
()
{
# If commands are not already set, use the defaults
[
-z
"
$MAGIC_ENTER_GIT_COMMAND
"
]
&&
MAGIC_ENTER_GIT_COMMAND
=
"git status -u ."
[
-z
"
$MAGIC_ENTER_OTHER_COMMAND
"
]
&&
MAGIC_ENTER_OTHER_COMMAND
=
"ls -lh ."
...
...
@@ -20,5 +19,9 @@ magic-enter () {
zle accept-line
fi
}
zle
-N
magic-enter
bindkey
"^M"
magic-enter
bindkey
-M
emacs
"^M"
magic-enter
bindkey
-M
vicmd
"^M"
magic-enter
bindkey
-M
viins
"^M"
magic-enter
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment