Cursor Control-L (CTRL-L) Keyboard Shortcuts in Terminal
When I’m using cursor in Linux, I’m using CTRL-L to clear the terminal screen, but it conflicts with cursor’s default behavior, which is used for “Add to Chat”.
The solution is to add a self-defined keyboard shortcut to clear the terminal screen.
Open menu of cursor: File - Settings - Keyboard Shortcuts, and click the “Open Keyboard Shortcuts(JSON)” button, paste the following code:
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+l",
"command": "aichat.newchataction",
"when": "!terminalFocus"
},
{
"key": "ctrl+l",
"command": "-aichat.newchataction"
},
{
"key": "ctrl+l",
"command": "workbench.action.terminal.selectCurrentLine",
"when": "terminalFocus"
}
]
After that, you can use “CTRL-L” to clear the terminal screen.
Reference: https://forum.cursor.com/t/change-ctrl-l-to-ctrl-i-control-l-is-for-clear-terminal/15310
更多文章
本站热门
- socks5 协议详解
- zerotier简明教程
- 搞定面试中的系统设计题
- frp 源码阅读与分析(一):流程和概念
- 用peewee代替SQLAlchemy
- Golang(Go语言)中实现典型的fork调用
- DNSCrypt简明教程
- 一个Gunicorn worker数量引发的血案
- Golang validator使用教程
- Docker组件介绍(二):shim, docker-init和docker-proxy
- Docker组件介绍(一):runc和containerd
- 使用Go语言实现一个异步任务框架
- 协程(coroutine)简介 - 什么是协程?
- SQLAlchemy简明教程
- Golang的template(模板引擎)简明教程