1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-16 02:40:08 +00:00
Commit graph

35 commits

Author SHA1 Message Date
bretello
65bbd24eec
feat(vi-mode): add INSERT_MODE_INDICATOR (#9732)
Co-authored-by: bretello <bretello@distruzione.org>
2021-12-29 10:34:57 +01:00
Marc Cornellà
93ad3a8821
docs(vi-mode): document $KEYTIMEOUT issue (#9588)
Closes #9588
2021-09-27 11:46:42 +02:00
CrispyConductor
3f34ce4da4
fix(vi-mode): fix keymap indicator on zle-line-finish (#9620)
* 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
2021-03-15 23:32:49 +01:00
Marc Cornellà
efcbd9f348 fix(vi-mode): ignore clip* function errors in yank and put widgets
Fixes #9605
2021-01-16 22:55:17 +01:00
Marc Cornellà
2118d35e01 fix(vi-mode)!: add back edit-command-line key binding as 'vv' (#9573)
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
2021-01-04 21:41:11 +01:00
Marc Cornellà
79980b00fb fix(vi-mode): hide cursor-change logic behind VI_MODE_SET_CURSOR setting
Fixes #9570
2021-01-04 21:31:07 +01:00
Marc Cornellà
94ce46d48b docs(vi-mode): revamp README and document settings 2021-01-04 21:31:07 +01:00
Marc Cornellà
0e833b622b refactor(vi-mode): remove duplicate bindkey logic and fix syntax 2021-01-02 23:59:55 +01:00
Robert Estelle
98762faa07
fix(vi-mode): control cursor, restore and use visual mode and speed up mode changes (#8004) 2021-01-02 22:41:57 +01:00
Marc Cornellà
5f7666e20b
vi-mode: reset KEYMAP on accept-line (#7818)
Fixes #7797
2019-05-19 18:22:23 +02:00
Roman Perepelitsa
8d7ce18e12 vi-mode: remove TRAPWINCH from plugin (#7753)
* Remove TRAPWINCH; it's unrelated to vi-mode

* Update prompt with ad hoc KEYMAP variable
  Fixes mode indicator when the terminal window is resized
2019-04-09 23:10:13 +02:00
Marc Cornellà
a628b552c4
vi-mode: add CTRL+S to search history forward
Fixes #6999
2019-04-09 16:48:56 +02:00
Marc Cornellà
14fead0964
vi-mode: disable displayed mode on startup
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
2018-09-24 18:52:11 +02:00
Marc Cornellà
9f1ffc64f1
vi-mode: reset-prompt if zle is active (TRAPWINCH)
Fixes zle errors when resizing:

  TRAPWINCH:zle: widgets can only be called when ZLE is active
2018-08-31 21:18:18 +02:00
Balint Gyapjas
285b540167 vi-mode show indicator on zle-line-init and SIGWINCH (#6449) 2018-08-29 12:00:35 -07:00
Trevor Rosen
3705d47bb3 Fix iTerm crash on window re-size (#5211) 2016-09-12 17:55:48 +02:00
Douglas Drumond
3ad92a57f1 Add ctrl-r, ctrl-a and ctrl-e support in vi-mode (#4994)
* 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>
2016-09-12 17:34:52 +02:00
Marc Cornellà
46824b39a3 Merge pull request #4191 from apjanke/vi-mode-fix-smkx
vi-mode: fix smkx/rmkx by removing broken line-init/finish widgets
2015-11-29 14:31:35 +01:00
Andrew Janke
8ea773582f vi-mode: remove line-init/finish widgets that broken terminfo keybindings
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.
2015-11-18 06:06:20 -05:00
Alexander Frolov
e957ae4135 Update README.md 2015-09-23 09:54:22 +03:00
Daniel Campoverde [alx741]
0e35bd4001 Plugins: vi-mode: Add first README file 2015-06-12 00:08:26 +02:00
Robby Russell
7b71dccbaf Merge pull request #3610 from bderrly/zle-active-check
Verify zle is active before trying to reset-prompt.
2015-02-22 09:17:17 -08:00
Brian Derr
d7837c6041 Shorten the zle check and reset-prompt into one line. 2015-02-21 18:08:54 -08:00
Brian Derr
bc8abe5ea2 Verify zle is active before trying to reset-prompt. 2015-02-19 13:30:50 -08:00
Daniel Campoverde [alx741]
33900dfd32 PLUGINS: vi-mode: allow ctrl-h, ctrl-?, ctrl-w for char and word deletion
Allow ctrl-h, ctrl-?, ctrl-w after changes in normal mode.
2015-02-18 14:29:44 -05:00
Daniel Campoverde [alx741]
099246dd9e PLUGINS: vi-mode: allow ctrl-p, ctrl-n for history navigation
Allow ctrl-p, ctrl-n for history navigation while in insert mode.
2015-02-18 14:25:15 -05:00
Gabor Marton
7de44dbdb7 Added trapwinch to vi-mode plugin. 2015-02-04 12:56:58 +01:00
Michael Hauser-Raspe
9e90bf0f23 Added v as a keybinding to edit-command-line
taken from [here](http://www.zsh.org/mla/users/2008/msg01013.html)
We want pressing v in command mode to take us to an editor (defined by the $VISUAL or $EDITOR variable or vi) to edit the current contents of the command line which (I believe) is a standard feature of bash vi-mode or other readline prompts (see [here](http://www.catonmat.net/download/bash-vi-editing-mode-cheat-sheet.pdf) and [here](http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-sheet/) for source).
2014-03-14 10:14:47 +00:00
Greg Berenfield
93c90a6bf5 Fix the fix for Issue #1479 2013-01-02 19:14:57 -05:00
Greg Berenfield
003dd8f4b6 fix for Issue 1479 2013-01-02 16:20:22 -05:00
Robby Russell
3199d2ed8d Merge pull request #1387 from jimhester/vi-mode-patch
Fixes for vi-mode terminal overwriting bugs
2012-12-04 06:34:02 -08:00
Max Bane
53854754e0 Revert "Fix to restore bindings after switching to vi-mode"
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
#
2012-11-28 02:02:58 -05:00
Jim Hester
4e513d72b9 Fixes for vi-mode terminal overwriting bugs
fixes #387 and https://github.com/robbyrussell/oh-my-zsh/pull/1321#issuecomment-9959540
and other problems of prompt overwriting when people did not realize that it
was vi mode causing the problem.  Hat tip to sorin ionescu, as I took this code
from prezto
2012-11-02 11:06:32 -04:00
Jim Hester
b609aa0e6c Fix to restore bindings after switching to vi-mode
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
2012-09-20 08:03:09 -04:00
Robby Russell
26d97a9355 Reorganizing plugins so that each plugin has it's own directory now so that any plugin-specific functions can be bundled within there. 2010-09-30 21:34:06 -07:00