简体   繁体   English

是否有一个 VSCode 快捷方式可以告诉我下一个快捷方式运行什么命令?

[英]Is there a VSCode shortcut which tells me what command the next shortcut runs?

Like Ctrl+hk in emacs which when pressed waits for the next shortcut and then tells the user which command that shortcut runs.就像 emacs 中的Ctrl+hk一样,按下它时会等待下一个快捷方式,然后告诉用户该快捷方式运行哪个命令。

You can search the keybindings, which amounts to the same thing, just a different user interface.您可以搜索键绑定,这相当于同一件事,只是不同的用户界面。 If you are a Mac user, please understand Ctrl below as meaning Cmd .如果您是 Mac 用户,请将下面的Ctrl理解为Cmd的意思。

Ctrl + K Ctrl + S – shows searchable key bindings Ctrl + K Ctrl + S - 显示可搜索的键绑定

Now you can search/filter by description or keystroke.现在您可以按描述按键搜索/过滤。 You have 2 ways to search by keystroke:您有 2 种按键搜索方式:

  1. Press Alt - K or click the icon of the little keyboard at the top right of the Keyboard Shortcut panel, then press the keys that you want to see the key binding for.Alt - K或单击“键盘快捷键”面板右上角的小键盘图标,然后按要查看其键绑定的键。 The keyboard icon toggles keystroke recording mode.键盘图标切换击键记录模式。 The recording mode is sticky;录音模式为粘性; each time you revisit the Keyboard Shortcuts tab you can just press the keys you are interested in to see their bindings.每次您重新访问“键盘快捷键”选项卡时,您只需按下您感兴趣的键即可查看它们的绑定。 Step by step:一步步:

    • When you press the Ctrl key you will see "ctrl" displayed, and the recording mode continues to listen to what you type.当您按下Ctrl键时,您将看到显示"ctrl" ,并且录音模式会继续听您输入的内容。 Don't do this right now, but FYI, if you toggle keystroke recording mode now, and then remove the quotes around "ctrl" , you will see a sorted list of all the key chords bound to Ctrl .现在不要这样做,但仅供参考,如果您现在切换击键记录模式,然后删除"ctrl"周围的引号,您将看到绑定到Ctrl的所有键和弦的排序列表。
    • Next, when you add the Shift key to the key chord, you then see "ctrl+shift" displayed.接下来,当您将Shift键添加到键和弦时,您会看到显示"ctrl+shift" Again, don't do this right now, but FYI, if you toggle keystroke recording mode now, and then remove the quotes, you will see a sorted list of all the key chords bound to Ctrl + Shift .同样,现在不要这样做,但仅供参考,如果您现在切换击键记录模式,然后删除引号,您将看到绑定到Ctrl + Shift的所有键和弦的排序列表。
    • Finally, adding the = key to the key chord shows all the commands bound to Ctrl + Shift + = .最后,将=键添加到键和弦会显示绑定到Ctrl + Shift + =的所有命令。
  2. Type ctrl to see all the keybindings that start with Ctrl .键入ctrl以查看所有以Ctrl开头的键绑定。 Add a + and then a character to see what keybindings remain for that filter.添加一个+ ,然后添加一个字符以查看该过滤器保留的键绑定。 For example, typing Ctrl+x shows 5 keybindings, the first of which is Cut .例如,键入Ctrl+x会显示 5 个键绑定,其中第一个是Cut

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM