如何创建突出显示终端文本的快捷方式:Ctrl+Shift+右/左、Ctrl+Shift+End、Ctrl+Shift+Home - 正如在 PowerShell ISE 中实现的那样?
如何创建按单词移动光标的快捷方式:Ctrl+右/左,类似于 PowerShell ISE?
我正在为愿意安装 zsh 的用户添加一个单独的答案。
这是不做任何假设的部分解决方案:
{
"key": "ctrl+left",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "\u001bb" },
"when": "terminalFocus"
},
{
"key": "ctrl+right",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "\u001bf" },
"when": "terminalFocus"
}
它将为您提供 Windows 风格的 Ctrl-左/右导航。
这位于您的 keybindings.json 中。我的在~\AppData\Roaming\Code\User\keybindings.json
and ~\AppData\Roaming\Code - Insiders\User\keybindings.json
。 (我在桌面上运行 Windows,但在 Linux 上进行远程开发。)
如果我能进一步了解这一点,我会更新。但这并不容易,因为:
- 无法真正在 shell 中本地执行:https://superuser.com/questions/555886/why-cant-i-highlight-text-in-a-linux-terminal-emulator-with-shiftarrow-keys https://superuser.com/questions/555886/why-cant-i-highlight-text-in-a-linux-terminal-emulator-with-shiftarrow-keys
- VS Code 中不存在用于突出显示终端中文本的命令 AFAICS(仅在编辑器中)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)