Skip to content

Commit

Permalink
update key bindings for format on paste
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed Jan 13, 2017
1 parent a524360 commit 3f3ea06
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/vs/editor/contrib/format/common/formatActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,21 @@ export class FormatSelectionAction extends AbstractFormatAction {
}

@editorAction
export class FormatOnPasteAction extends AbstractFormatAction {
export class PasteAndFormatAction extends AbstractFormatAction {
constructor() {
super({
id: 'editor.action.formatOnPaste',
label: nls.localize('formatOnPaste.label', "Format on paste"),
alias: 'Format on paste',
precondition: EditorContextKeys.Writable
id: 'editor.action.pasteAndFormat',
label: nls.localize('pasteAndFormat.label', "Paste and Format"),
alias: 'Paste and Format',
precondition: ContextKeyExpr.and(EditorContextKeys.Writable, ModeContextKeys.hasDocumentSelectionFormattingProvider),
kbOpts: {
kbExpr: EditorContextKeys.TextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_V)
},
menuOpts: {
group: '1_modification',
order: 1.32
}
});
}

Expand Down

0 comments on commit 3f3ea06

Please sign in to comment.