* Update VI_KEYMAP on zle-line-finish. Fixes next prompt draw.
* Also fix vi-mode prompt redraw in case previous prompt was canceled
* Do not redraw fix prompt if VI_MODE_RESET_PROMPT_ON_MODE_CHANGE is unset
* Use a local variable instead of global in function
BREAKING CHANGE: the key binding to open an editor to edit the command line has
been moved from being `v` (press v once) to being `vv` (press v twice). Now, the
action for `v` is the default `visual-mode`, as is in Vim.
Fixes#9573
This change had the unintended consequence of overriding the functions to ensure
that application mode was set to use $terminfo sequences, introduced in #6449.
Fixes#7137
* Add ctrl-r support in vi-mode to perform backward search in history
* Add ctrl-a support to move to bol in vi-mode
* Add ctrl-e support to move to eol in vi-mode
Signed-off-by: Douglas Drumond <douglas@cafelinear.com>
The zle-line-init and zle-line-finish definitions here were broken with
respect to smkx/rmkx because their "if" logic had fallthrough where it shouldn't,
so the mode was left in rmkx all the time. This just removes those widgets
entirely, because they're now defined (correctly) in lib/keybindings.zsh and
not needed in plugins.
This reverts commit b609aa0e6c -- this commit
was a bad idea, because it makes vi-mode very difficult to use. The default
`bindkey` keybindings are NOT MEANT to coexist with `bindkey -v` Vi mode;
that's why `bindkey -v` clears them in the first place! Restoring all of the
default keybindings after enabling Vi mode, the way the reverted commit did,
causes many collisions between those default keybindings that begin with ESC
and the command-mode-initiating ESC of Vi mode. See Issue 1438 of
robbyrussell/oh-my-zsh. If people have custom keybindings, they should create
them in their ~/.zshrc AFTER enabling the vi-mode plugin and sourcing
oh-my-zsh.sh.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: plugins/vi-mode/vi-mode.plugin.zsh
#
the vi-mode plugin destroys any bindings made before it is sourced due to the
'bindkey -v' call to switch to using vi-mode. This patch saves the bindings
before invoking 'bindkey -v' then rebinds them afterwards, this fixes a number
of outstanding issues due to people using vi-mode and having things in oh-my-zsh
break due to the bindings being destroyed