當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript KbExpr.and方法代碼示例

本文整理匯總了TypeScript中vs/platform/keybinding/common/keybinding.KbExpr.and方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript KbExpr.and方法的具體用法?TypeScript KbExpr.and怎麽用?TypeScript KbExpr.and使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vs/platform/keybinding/common/keybinding.KbExpr的用法示例。


在下文中一共展示了KbExpr.and方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: constructor

	constructor() {
		super(
			'editor.action.removeCommentLine',
			nls.localize('comment.line.remove', "Remove Line Comment"),
			'Remove Line Comment',
			Type.ForceRemove
		);

		this._precondition = KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable);

		this.kbOpts = {
			kbExpr: KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable),
			primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_U)
		};
	}
開發者ID:BlackstarSoon,項目名稱:vscode,代碼行數:15,代碼來源:comment.ts

示例2: constructor

	constructor(id:string, label:string, alias:string, left:boolean) {
		super(id, label, alias, true);

		this._precondition = KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable);

		this.left = left;
	}
開發者ID:BlackstarSoon,項目名稱:vscode,代碼行數:7,代碼來源:carretOperations.ts

示例3: constructor

	constructor() {
		super(
			'editor.action.showSnippets',
			nls.localize('snippet.suggestions.label', "Insert Snippet"),
			'Insert Snippet',
			true
		);

		this._precondition = KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable);
	}
開發者ID:BlackstarSoon,項目名稱:vscode,代碼行數:10,代碼來源:snippetCompletion.ts

示例4: constructor

	constructor() {
		super(
			'editor.action.addCommentLine',
			nls.localize('comment.line.add', "Add Line Comment"),
			'Add Line Comment',
			Type.ForceAdd
		);

		this.kbOpts = {
			kbExpr: KbExpr.and(EditorKbExpr.TextFocus, EditorKbExpr.Writable),
			primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_C)
		};
	}
開發者ID:Suhoy95,項目名稱:vscode,代碼行數:13,代碼來源:comment.ts

示例5: constructor

	constructor() {
		super(
			'editor.action.clipboardCutAction',
			nls.localize('actions.clipboard.cutLabel', "Cut"),
			'Cut',
			true,
			'cut'
		);

		this._precondition = KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable);

		this.kbOpts = {
			kbExpr: KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable),
			primary: KeyMod.CtrlCmd | KeyCode.KEY_X,
			win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_X, secondary: [KeyMod.Shift | KeyCode.Delete] }
		};

		this.menuOpts = {
			kbExpr: EditorContextKeys.Writable,
			menu: MenuId.EditorContext,
			group: CLIPBOARD_CONTEXT_MENU_GROUP,
			order: 1
		};
	}
開發者ID:BlackstarSoon,項目名稱:vscode,代碼行數:24,代碼來源:clipboard.ts

示例6: constructor

	constructor() {
		super(
			'editor.emmet.action.expandAbbreviation',
			nls.localize('expandAbbreviationAction', "Emmet: Expand Abbreviation"),
			'Emmet: Expand Abbreviation',
			'expand_abbreviation',
			{
				primary: KeyCode.Tab,
				kbExpr: KbExpr.and(
					EditorContextKeys.TextFocus,
					EditorContextKeys.HasOnlyEmptySelection,
					EditorContextKeys.HasSingleSelection,
					EditorContextKeys.TabDoesNotMoveFocus,
					KbExpr.has('config.emmet.triggerExpansionOnTab')
				)
			}
		);
	}
開發者ID:bobmagicii,項目名稱:vscode,代碼行數:18,代碼來源:expandAbbreviation.ts

示例7: constructor

	constructor() {
		super(
			'editor.action.quickOutline',
			nls.localize('QuickOutlineAction.label', "Go to Symbol..."),
			'Go to Symbol...',
			nls.localize('quickOutlineActionInput', "Type the name of an identifier you wish to navigate to")
		);

		this._precondition = KbExpr.and(EditorContextKeys.Focus, ModeContextKeys.hasDocumentSymbolProvider);

		this.kbOpts = {
			kbExpr: EditorContextKeys.Focus,
			primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_O
		};

		this.menuOpts = {
			group: 'navigation',
			order: 3,
			kbExpr: ModeContextKeys.hasDocumentSymbolProvider
		};
	}
開發者ID:BlackstarSoon,項目名稱:vscode,代碼行數:21,代碼來源:quickOutline.ts


注:本文中的vs/platform/keybinding/common/keybinding.KbExpr.and方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。