Skip to content

Commit

Permalink
Adds additional helpers for refactoring to intellij (#1425)
Browse files Browse the repository at this point in the history
this pull request adds commands to go to a line and search for some text
and immediately perform an action on that. it makes it very simple to
operate on words that you can see without having access to cursorless.
This is very helpful in intellij since you don't have cursorless. It
also expands on existing refactoring commands by adding specific ones
for things like renaming and quick fixing.

---------

Co-authored-by: Nicholas Riley <com-github@sabi.net>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 17, 2024
1 parent 09d0d04 commit 2cb9eb8
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions apps/jetbrains/jetbrains.talon
Original file line number Diff line number Diff line change
Expand Up @@ -234,18 +234,48 @@ comment next <user.text> [over]:
user.idea("find next {text}, action CommentByLineComment")
go last <user.text> [over]: user.idea("find prev {text}, action EditorRight")
go next <user.text> [over]: user.idea("find next {text}, action EditorRight")
go <number> <user.text> [over]:
user.idea("goto {number} 0,find next {text}, action EditorRight")
paste last <user.text> [over]:
user.idea("find prev {text}, action EditorRight, action EditorPaste")
paste next <user.text> [over]:
user.idea("find next {text}, action EditorRight, action EditorPaste")
refactor <number> <user.text> [over]:
user.idea("goto {number} 0,find next {text}, action Refactorings.QuickListPopupAction")
refactor last <user.text> [over]:
user.idea("find prev {text}, action Refactorings.QuickListPopupAction")
refactor next <user.text> [over]:
user.idea("find next {text}, action Refactorings.QuickListPopupAction")
rename <number> <user.text> [over]:
user.idea("goto {number} 0,find next {text}, action RenameElement")
rename next <user.text> [over]: user.idea("find next {text}, action RenameElement")
rename last <user.text> [over]: user.idea("find prev {text}, action RenameElement")
complete <number> <user.text> [over]:
user.idea("goto {number} 0,find next {text},action CodeCompletion")
complete next <user.text> [over]: user.idea("find next {text},action CodeCompletion")
complete last <user.text> [over]: user.idea("find prev {text},action CodeCompletion")
quick fix <number> <user.text> [over]:
user.idea("goto {number} 0,find next {text},action ShowIntentionActions")
quick fix next <user.text> [over]:
user.idea("find next {text},action ShowIntentionActions")
quick fix last <user.text> [over]:
user.idea("find prev {text},action ShowIntentionActions")
replace last <user.text> [over]: user.idea("find prev {text}, action EditorPaste")
replace next <user.text> [over]: user.idea("find next {text}, action EditorPaste")

follow <number> <user.text> [over]:
user.idea("goto {number} 0,find next {text},action GotoDeclaration")
follow next <user.text> [over]: user.idea("find next {text},action GotoDeclaration")
follow last <user.text> [over]: user.idea("find prev {text},action GotoDeclaration")

reference <number> <user.text> [over]:
user.idea("goto {number} 0,find next {text},action FindUsages")
reference next <user.text> [over]: user.idea("find next {text},action FindUsages")
reference last <user.text> [over]: user.idea("find prev {text},action FindUsages")

select last <user.text> [over]: user.idea("find prev {text}")
select next <user.text> [over]: user.idea("find next {text}")
select <number> <user.text> [over]: user.idea("goto {number} 0,find next {text}")

select camel left: user.extend_camel_left()
select camel right: user.extend_camel_right()
Expand Down

0 comments on commit 2cb9eb8

Please sign in to comment.