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

[Bug: VS Code Snippets] When inserting a snippet, Pressing TAB inserts a Tab Space instead of moving the Focus to next Edit Position in snippet #141004

Closed
ashuvssut opened this issue Jan 19, 2022 · 2 comments
Assignees
Labels
info-needed Issue requires more information from poster snippets

Comments

@ashuvssut
Copy link

ashuvssut commented Jan 19, 2022

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.63.2
  • OS Version: Windows 10 21H2

ISSUE

Suppose I inserted a snippet
image

Now my focus is on Position 1.

When I press Tab, instead of Moving my focus to Position 2, the editor inserts a Tab Space in Position 1
Whats Expected? Instead of inserting a Tab Space in Position 1, move the focus of the cursor to Position 2


I have found a work around. when entering snippet, explicitly turn on Tab Moves Focus mode by pressing Ctrl + M.
But I think VS Code should automatically enter into Tab Moves Focus mode when inserting snippets and automatically turn off Tab Moves Focus mode when editing the snippet is over

@jrieken jrieken added info-needed Issue requires more information from poster snippets labels Jan 20, 2022
@jrieken
Copy link
Member

jrieken commented Jan 20, 2022

Please share the snippet and make your keybindings.json file. It's likely that you or an extension have reconfigured what Tab does. Best is to start so: code --user-data-dir ~/Desktop/test1-data --extensions-dir ~/Desktop/test1-ext

@ashuvssut
Copy link
Author

Thankyou @jrieken for the hint. ISSUE SOLVED!

in keybindings.json there was keybinding that I once created to use with VS Code Vim,
{ "key": "tab", "command": "tab", "when": "editorTextFocus && !editorTabMovesFocus" },
I guess I have to think of an alternative to this😅

@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster snippets
Projects
None yet
Development

No branches or pull requests

2 participants