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

fix: unnecessary remap to select-mode which disturbs nvim-snippy #9

Merged
merged 1 commit into from
Jul 25, 2023
Merged

fix: unnecessary remap to select-mode which disturbs nvim-snippy #9

merged 1 commit into from
Jul 25, 2023

Conversation

astier
Copy link
Contributor

@astier astier commented Mar 14, 2023

vmap is used to map gx to visual-mode. However, vmap not only maps to visual-mode but also select-mode. This is first of all not necessary because xmap is enough to map to visual-mode but more importantly it disturbs other plugins which rely on select-mode like nvim-snippy. During snippet-expansion snippy selects with the select-mode placeholders which should be overwritten by the user. Typing g becomes impossible without pressing another 2nd key because it's remapped by gx-extended. It is generally good practice to use xmap instead of vmap unless necessary.

`vmap` is used to map `gx` to visual-mode. However, `vmap` not only maps
to visual-mode but also select-mode. This is first of all not necessary
because `xmap` is enough to map to visual-mode but more importantly it
disturbs other plugins which rely on select-mode like `nvim-snippy`.
During snippet-expansion snippy selects with the select-mode
placeholders which should be overwritten by the user. Typing `g` becomes
impossible without pressing another 2nd key because it's remapped by
gx-extended. It is generally good practice to use xmap instead of vmap
unless necessary.
Copy link
Owner

@stsewd stsewd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Sorry, I must have missed this PR from my notifications

@stsewd stsewd merged commit 224b18f into stsewd:master Jul 25, 2023
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.

None yet

2 participants