Skip to content
Discussion options

You must be logged in to vote

You could bind shortcut keys to the following in "Keyboard shortcuts":

{
  "key": "shift+alt+f",
  "command": "editor.action.formatDocument",
  "when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
},
{
  "key": "cmd+k cmd+f",
  "command": "editor.action.formatSelection",
  "when": "editorHasDocumentSelectionFormattingProvider && editorTextFocus && !editorReadonly"
}

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@werkstattcodes
Comment options

@renkun-ken
Comment options

@JacobBumgarner
Comment options

@JacobBumgarner
Comment options

Answer selected by eitsupi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants