Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

Use xnoremap for visual mode mappings #20

Merged
merged 1 commit into from Feb 17, 2012
Merged

Use xnoremap for visual mode mappings #20

merged 1 commit into from Feb 17, 2012

Conversation

suy
Copy link
Contributor

@suy suy commented Feb 6, 2012

Hi!

As you know, AutoClose uses vnoremap for the actions that wrap the visual selection. However, vnoremap maps both visual and select modes. Select mode is not very well known, but is very useful for snippets plugins. The Vim documentation advises against mapping printable characters in select mode (see :h Select-mode-mapping or :h mapmode-x) because it might confuse the user. In my case is causing me a conflict with the plugin UltiSnips.

This simple change fixes this.
Thank you!

@suy
Copy link
Contributor Author

suy commented Feb 13, 2012

Hi.

I've updated the commit (it was 32a5a29) to apply to current master (now is 85e22d4). Just in case I didn't explain myself properly, the change is use xnoremap to still map the keys in visual mode, but not map them in select mode (vnoremap maps both modes).

Thank you.

@artm
Copy link
Collaborator

artm commented Feb 13, 2012

good idea

@artm
Copy link
Collaborator

artm commented Feb 15, 2012

I pulled it locally and tested, it works as expected and I agree with the rationale. This request has my vote.

Townk added a commit that referenced this pull request Feb 17, 2012
Use xnoremap for visual mode mappings
@Townk Townk merged commit d0e7890 into Townk:master Feb 17, 2012
@suy
Copy link
Contributor Author

suy commented Feb 22, 2012

Thank you!

@Townk
Copy link
Owner

Townk commented Feb 24, 2012

No no, thank YOU :)
Patches and improvements are always welcome!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants