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


更多文章
  • 在KVM里安装Minikube
  • 搞定面试中的系统设计题
  • Crontab + Sendmail实现定时任务并且通知
  • Nginx设置Referer来防止盗图
  • Graphviz dot简明教程
  • jQuery简明教程
  • Python RQ(Redis Queue)添加gevent支持
  • 读《超级运营术》- 如何做社区?
  • 技术人,光有技术是不行的
  • 搭建aria2服务器
  • 使用shairport-sync搭建airplay音频服务器
  • VirtManager Windows自适应屏幕
  • 使用btrfs组建RAID1
  • Swagger? 不好用
  • Golang/Python最佳实践