Skip to content

Instantly share code, notes, and snippets.

@humorless
Last active February 4, 2024 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save humorless/1d0e5ac743f718dca89fb4d2f328b9f2 to your computer and use it in GitHub Desktop.
Save humorless/1d0e5ac743f718dca89fb4d2f328b9f2 to your computer and use it in GitHub Desktop.
corgi 筆記

有兩種 leader 鍵:SPC 與 comma

啟動 emacs

emacs -nw

Corgi 文件

https://github.com/corgi-emacs/corgi/blob/main/corgi_manual.org

vim edit

  • L, H - next, prev s-expression
  • 2yL copy (“yank”) the next 2 s-expressions

defintion

  • , g g is a general binding to jump to an identifier’s definition
  • , g b will pop you back to where you came from

Control REPL

  • , s c connect to a REPL / process
  • , s s toggle between REPL and code buffer
  • , s q quit current REPL
  • , j j connect to a regular REPL (Clojure)

Evaluate command

  • , e b - eval buffer
  • , e e - eval from before cursor
  • , e p - evaluate last sexp and print the results
  • , RET - evaluate the outer form

Evaluate Register Command

  • ,,g --> (user/go)
  • ,,b --> (user/browse)

開檔案

  • spc f f - 開檔,指定檔名
  • spc p f - 開檔,fuzzy search
  • spc p s - search in project

window 操作

  • spc 1 - jump to the window 1
  • spc w 0 - close the window
  • spc w 2 - 開兩個視窗

buffer 操作

spc b l - 顯示所有的 buffers

Emacs only command

  • C-g - cancel current operation
  • C-x C-c - quit emacs
  • C-x C-u C-e - write the result of eval in line
  • C-z quit evil mode temporily
  • SPC SPC - run command

window command

C-b c 建立一個新視窗
C-b p 上一個視窗
C-b n 下一個視窗
C-b <number> 依照編號直接切換(編號顯示於狀態列)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment