cursor
和 code
兩個指令,把 Cursor 無縫整合進你的開發流程。
安裝 CLI 指令
- 開啟 Command Palette(Cmd/Ctrl + P)
- 輸入「Install」以篩選安裝指令
- 選取並執行
Install 'cursor' to shell
- 重複並選取
Install 'code' to shell
使用 CLI 指令
指令選項
- 開啟檔案:
cursor file.js
- 開啟資料夾:
cursor ./my-project
- 同時開啟多個項目:
cursor file1.js file2.js folder1/
- 在新視窗中開啟:
cursor -n
或cursor --new-window
- 等待視窗關閉後結束:
cursor -w
或cursor --wait
常見問題
cursor 跟 code 指令有什麼差別?
cursor 跟 code 指令有什麼差別?
沒有差別。提供
code
指令是為了與 VS Code 相容。需要同時安裝這兩個指令嗎?
需要同時安裝這兩個指令嗎?
不用,照自己的偏好裝其中一個或兩個都可以。
指令會安裝在哪裡?
指令會安裝在哪裡?
指令會安裝到系統預設的 shell 設定檔(例如
.bashrc
、.zshrc
或 .config/fish/config.fish
)。