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

Already on GitHub? Sign in to your account

Use xnoremap for visual mode mappings #20

merged 1 commit into from Feb 17, 2012


None yet
3 participants

suy commented Feb 6, 2012


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 commented Feb 13, 2012


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 commented Feb 13, 2012

good idea


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 Townk added a commit that referenced this pull request Feb 17, 2012

@Townk Townk Merge pull request #20 from suy/smodemaps
Use xnoremap for visual mode mappings

@Townk Townk merged commit d0e7890 into Townk:master Feb 17, 2012


suy commented Feb 22, 2012

Thank you!


Townk commented Feb 24, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment