VSCode Extension API - Identify file or folder click in explorer context menu

前端 未结 5 1846
野趣味
野趣味 2020-12-06 18:42

VSCode 1.3 has added support for adding commands to context menus. Is there a way to identify whether a file or folder is clicked to open the explorer context menu?

5条回答
  •  难免孤独
    2020-12-06 19:03

    https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts

    is file: "when": "!explorerResourceIsFolder"

    is dir: "when": "explorerResourceIsFolder"

提交回复
热议问题