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

Use X as visual mapping for Exchange #20

Merged
merged 2 commits into from
Feb 25, 2014
Merged

Conversation

wellle
Copy link
Contributor

@wellle wellle commented Feb 24, 2014

As suggested by Drew Neil in today's VimCast:

Use the visual mapping X to avoid the delay after vc when changing visually selected text. Shadowing v_X should be no problem as v_D does the same and seems to be the more natural choice to delete the visually selected lines.

This fixes #14.

@tommcdo
Copy link
Owner

tommcdo commented Feb 25, 2014

I'm really tempted, but this hides the standard {visual}X behaviour, and as far as I can tell there's no other way to do what it does. I can't decide what's worse -- hiding something or causing a delay. I need advice / opinions.

@wellle
Copy link
Contributor Author

wellle commented Feb 25, 2014

Oh yes there is: {visual}D is exactly the same as {visual}X.

@tommcdo
Copy link
Owner

tommcdo commented Feb 25, 2014

The last sentence in that documentation talks about visual block mode, and what it mentions is only for v_D. It's a subtle difference, but a difference nonetheless. But the truth may be that no one ever users that behaviour.

@wellle
Copy link
Contributor Author

wellle commented Feb 25, 2014

Yes I would argue that you probably wouldn't use visual block mode to delete entire lines.

@tommcdo
Copy link
Owner

tommcdo commented Feb 25, 2014

After some testing, it seems that in Visual and Linewise Visual, v_X is the same as v_D; in Blockwise Visual, v_X is the same as v_x and v_d. So I guess nothing is completely shadowed.

Can you reflect this change in the README and documentation?

@wellle
Copy link
Contributor Author

wellle commented Feb 25, 2014

Done.

tommcdo added a commit that referenced this pull request Feb 25, 2014
Use X as visual mapping for Exchange
@tommcdo tommcdo merged commit e2da5d3 into tommcdo:master Feb 25, 2014
@tommcdo
Copy link
Owner

tommcdo commented Feb 25, 2014

Thanks!

@wellle
Copy link
Contributor Author

wellle commented Feb 25, 2014

👍

@wellle wellle deleted the visual-X branch February 25, 2014 00:42
@tommcdo
Copy link
Owner

tommcdo commented Feb 25, 2014

Whoops. We just broke the first demonstration in that Vimcast.

@nelstrom
Copy link

This looks good! I'll update the shownotes on Vimcast 65, maybe the video too if I'm feeling brave.

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

Successfully merging this pull request may close these issues.

Default mappings causes a surprise when trying to change visual mode text to insert an 'x'
3 participants