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

Broken jsx autocomplete #5474

Closed
andreyohiienko opened this issue Oct 22, 2020 · 1 comment · Fixed by #5540
Closed

Broken jsx autocomplete #5474

andreyohiienko opened this issue Oct 22, 2020 · 1 comment · Fixed by #5540

Comments

@andreyohiienko
Copy link

andreyohiienko commented Oct 22, 2020

Describe the bug
When I write component name and press "tab" I expect to write something between opening closing component's jsx tag, but for some reason vim switches to Visual mode. When I write HTML tags vim switches to Insert mode after pressing "tab". Also 1.16.0 worked properly.

To Reproduce
Steps to reproduce the behavior:

1."emmet.triggerExpansionOnTab": true, "emmet.includeLanguages": { "javascript": "javascriptreact" }
2. Open .js file
3. Write InputField
4. Press tab
5. Try to write something <InputField>here</InputField>

Expected behavior
Ability to write code at once after pressing tab autocompletion between opening and closing component's jsx tag and switching vim to insert mode.
Screenshots
https://www.screencast.com/t/uyDHht1WmPAY

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.17.1
  • VSCode version: 1.50.1
  • OS: windows

Additional context
For some snippets like 'clo' which is used for "console.log('object', object)" in ES7 React/Redux/GraphQL/React-Native snippets also observed switching to Visual mode instead of insert mode.
This issue driving me crazy I'll appreciate for any suggestions or fix.
Thanks

J-Fields pushed a commit that referenced this issue Nov 13, 2020
When in insert mode and inserting a snippet it will no longer change to visual mode, now it stays in "Insert Mode" or "Insert Mode - Multicursor"
Fixes #5240, fixes #5474, fixes #5538
@MarcWeber
Copy link

MarcWeber commented Dec 29, 2020

vscode.window.activeTextEditor.insertSnippet("something") does trigger it. Wrote my own code to use snipmate snippets but its kind of annoying if cursor is not at the placeholder positions. Just is not enough cause cursor position will be wrong.

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.

2 participants