Skip to content

Commit

Permalink
More emacs commands, including xref commands (go-to-definition) (talo…
Browse files Browse the repository at this point in the history
…nhub#1443)

Adds more emacs commands, mostly `xref` commands but also `other-frame`
and `visit-tags-table`. Also sorts `emacs_commands.csv`.
  • Loading branch information
rntz authored Jun 1, 2024
1 parent 15d4fdc commit 18c0aa4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
13 changes: 12 additions & 1 deletion apps/emacs/emacs.talon
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,16 @@ rectangle (yank | paste): user.emacs("yank-rectangle")
rectangle copy: user.emacs("copy-rectangle-as-kill")
rectangle number lines: user.emacs("rectangle-number-lines")

# ----- XREF SUPPORT ----- #
[xref] find definition: user.emacs("xref-find-definitions")
[xref] find definition other window: user.emacs("xref-find-definitions-other-window")
[xref] find definition other frame: user.emacs("xref-find-definitions-other-frame")
[xref] find references: user.emacs("xref-find-references")
[xref] find references [and] replace: user.emacs("xref-find-references-and-replace")
xref find apropos: user.emacs("xref-find-apropos")
xref go back: user.emacs("xref-go-back")
visit tags table: user.emacs("visit-tags-table")

# ----- PROJECT SUPPORT ----- #
project [find] file: user.emacs("project-find-file")
project [find] (regex | grep): user.emacs("project-find-regexp")
Expand Down Expand Up @@ -324,7 +334,8 @@ merge next: user.emacs("smerge-next")
merge last: user.emacs("smerge-prev")
merge keep upper: user.emacs("smerge-keep-upper")
merge keep lower: user.emacs("smerge-keep-lower")
merge keep this: user.emacs("smerge-keep-current")
merge keep base: user.emacs("smerge-keep-base")
merge keep (this | current): user.emacs("smerge-keep-current")
merge refine: user.emacs("smerge-refine")
merge split: user.emacs("smerge-resolve")

Expand Down
11 changes: 10 additions & 1 deletion apps/emacs/emacs_commands.csv
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ global-hl-line-mode,, g-hl-l-m
global-visual-line-mode,, gl-v-l-m
goto-line, meta-g meta-g
highlight-lines-matching-regexp, meta-s h l
highlight-regexp, meta-s h r
highlight-phrase, meta-s h p
highlight-regexp, meta-s h r
hl-line-mode,, hl-l-m
indent-region, meta-ctrl-\
indent-rigidly, ctrl-x tab
Expand Down Expand Up @@ -102,6 +102,7 @@ next-buffer, ctrl-x right
next-error, meta-g n
occur, meta-s o
open-rectangle, ctrl-x r o
other-frame, ctrl-x 5 o
other-window, ctrl-x o
outline-backward-same-level, ctrl-c @ ctrl-b
outline-demote, ctrl-c @ ctrl->
Expand Down Expand Up @@ -214,9 +215,17 @@ unhighlight-regexp, meta-s h u
universal-argument, ctrl-u
vc-annotate, ctrl-x v g
view-lossage, ctrl-h l
visit-tags-table,, v-t-t
visual-line-mode,, visu-l-m
whitespace-cleanup,, wh-cl
whitespace-mode,, white-m
widen, ctrl-x n w
xref-find-apropos, meta-ctrl-.
xref-find-definitions, meta-.
xref-find-definitions-other-frame, ctrl-x 5 .
xref-find-definitions-other-window, ctrl-x 4 .
xref-find-references, meta-?
xref-find-references-and-replace
xref-go-back,"meta-,"
yank, ctrl-y
yank-rectangle, ctrl-x r y

0 comments on commit 18c0aa4

Please sign in to comment.