Skip to content

Balanced fix for snippet Tab conflict (Issue #58)#59

Open
albertromkes wants to merge 1 commit intomasterfrom
fix/issue-58-balanced-snippet-tab
Open

Balanced fix for snippet Tab conflict (Issue #58)#59
albertromkes wants to merge 1 commit intomasterfrom
fix/issue-58-balanced-snippet-tab

Conversation

@albertromkes
Copy link
Copy Markdown
Owner

Summary\n\nThis PR introduces a balanced fix for the snippet-mode Tab conflict reported in #58, while preserving existing TabOut behavior for users who prefer it.\n\n### What changed\n\n- Added new setting: \n - (default):\n - In snippet mode, try native snippet placeholder navigation first ().\n - If snippet navigation does not move the cursor, TabOut behavior applies as fallback.\n - :\n - Always prioritize existing TabOut behavior, including in snippet mode.\n\n- Updated command implementation to support the behavior above.\n- Added/updated keybinding config tests to cover the new setting and enum values.\n\n## Why this is balanced\n\n- Fixes #58 by default: snippet placeholder flow is respected.\n- Avoids degrading existing workflows: users who rely on TabOut-first behavior in snippets can switch to .\n- Non-snippet behavior is unchanged.\n\n## Validation\n\n- TypeScript compile:

TabOut@0.2.4 vscode:prepublish
tsc -p ./\n- Existing keybinding guard tests updated for new setting metadata.\n\nCloses #58

@albertromkes
Copy link
Copy Markdown
Owner Author

Summary

This PR introduces a balanced fix for the snippet-mode Tab conflict reported in #58, while preserving existing TabOut behavior for users who prefer it.

What changed

  • Added new setting: tabout.snippetTabBehavior

    • preferSnippetNavigation (default):
      • In snippet mode, try native snippet placeholder navigation first (jumpToNextSnippetPlaceholder).
      • If snippet navigation does not move the cursor, TabOut behavior applies as fallback.
    • preferTabOut:
      • Always prioritize existing TabOut behavior, including in snippet mode.
  • Updated tabout command implementation to support the behavior above.

  • Added/updated keybinding config tests to cover the new setting and enum values.

Why this is balanced

Validation

  • TypeScript compile: npm run vscode:prepublish
  • Existing keybinding guard tests updated for new setting metadata.

Closes #58

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.

Bug: Conflict in the code snippet/在代码片段中冲突

1 participant