Skip to content

Default Keybinding #2

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

Open
ChekTek opened this issue Mar 1, 2018 · 1 comment
Open

Default Keybinding #2

ChekTek opened this issue Mar 1, 2018 · 1 comment

Comments

@ChekTek
Copy link

ChekTek commented Mar 1, 2018

Other formatter plugins I've downloaded tie their action to the editor.action.formatSelection/editor.action.formatDocument, but this one provides its own command. This wouldn't be an issue if you keep the default mapping, but I've mapped my format document command to have a different keybinding which results in vscode not knowing what formatter to use. It might be nice to have it map to whatever keybinding the user has set for formatting files.
sql extension

@noelhibbard
Copy link

I assigned mine to the default Shift+Alt+F hotkey and used a when condition so this hotkey is only active when the language is set to SQL which prevents the SQL formatter from overwriting other formats. Works perfect.

    {
        "key": "shift+alt+f",
        "command": "poor-mans-t-sql-formatter.formatSql",
        "when": "editorLangId == sql && editorTextFocus"
    }

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

No branches or pull requests

2 participants