Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support toggling exclusive/inclusive motion #293

Open
3 tasks done
sfo opened this issue Sep 4, 2024 · 0 comments
Open
3 tasks done

Support toggling exclusive/inclusive motion #293

sfo opened this issue Sep 4, 2024 · 0 comments

Comments

@sfo
Copy link

sfo commented Sep 4, 2024

General information

  • Terminal program: tmux 3.4 (tmux-256color)
  • Operating system: Linux (6.8.0-41-generic problems in vim built-in terminal when vim is opened in tmux #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 2 20:41:06 UTC 2024 x86_64 GNU/Linux)
  • ZSH framework: oh-my-zsh master (b8c69d2), oh-my-zsh master (b8c69d2)
  • ZSH version: zsh 5.9 (x86_64-ubuntu-linux-gnu)
  • ZVM version: zsh-vi-mode 0.11.0 (203b68335, 2024-09-03 13:52:10 +0200)

Basic examination

  • I have read through the README page
  • I have the latest version of zsh-vi-mode
  • I have tested with another terminal program

Problem description

According to the vim documentation, using v, V, or CTRL-V after an operator but before the motion command changes the behavior of the motion command, e.g.:

v	When used after an operator, before the motion command: Force
	the operator to work characterwise, also when the motion is
	linewise.  If the motion was linewise, it will become
	|exclusive|.
	If the motion already was characterwise, toggle
	inclusive/exclusive.  This can be used to make an exclusive
	motion inclusive and an inclusive motion exclusive.

However, when in normal mode (cursor is on last 's') and pressing dvb, it deletes the last character on pressing the v and moves the cursor back to beginning of the package name when hitting the final b:

$ sudo apt-install idontwantthis
$ sudo apt-install idontwantthi

Reproduction steps

  1. Insert some prompt, escape to normal mode
  2. hit dvb in sequence
  3. observe

Expected behavior

Like the vim doc says, hitting v after the command d should switch from exclusive motion to inclusive motion and thus delete the whole word, including the character under the cursor (you can see it working using vim editor"

$ sudo apt-install idontwantthis
$ sudo apt-install 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant