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

Vim unexpectedly turns into visual mode for adjacent snippet placeholders #9236

Open
adong660 opened this issue Sep 2, 2024 · 0 comments · May be fixed by #9239
Open

Vim unexpectedly turns into visual mode for adjacent snippet placeholders #9236

adong660 opened this issue Sep 2, 2024 · 0 comments · May be fixed by #9239

Comments

@adong660
Copy link

adong660 commented Sep 2, 2024

After creating a snippet with several placeholders, my expected behavior is that, vim keeps in the insert mode, and the user inputs some letters in the first placeholder, and then presses the TAB key to go to the second to input, until all placeholders are filled. During this process, vim is always in the insert mode unless the user presses the ESC key. This holds for most cases so I think this should be the expected behavior.

However, if two placeholders in a snippet are directly adjacent, i.e. there's no other characters between them, when the user finishes filling the first placeholder, and presses TAB to go to the second, vim will unexpectedly go to the visual mode, selecting the second placeholder. If the second placeholder doesn't have another placeholder nested in it, pressing a c will deal with the case; otherwise, more key presses are necessary.

The attached MP4 video file shows the expected and unexpected behaviors mentioned above.

bandicam.2024-09-02.23-18-13-676.mp4
@adong660 adong660 changed the title Vim strangely turns into normal mode for adjacent snippet placeholders Vim unexpectedly turns into visual mode for adjacent snippet placeholders Sep 2, 2024
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 a pull request may close this issue.

1 participant