Skip to content

Commit

Permalink
Added modifiers head and tail (cursorless-dev#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson authored Aug 1, 2021
1 parent c51bf3c commit e9dd8d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/modifiers/head_tail.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from talon import Module

mod = Module()


@mod.capture(rule="head | tail")
def cursorless_head_tail(m) -> str:
return {"modifier": {"type": m[0]}}
3 changes: 2 additions & 1 deletion src/primitive_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"<user.cursorless_position>", # before, above, end of
"<user.cursorless_selection_type>", # token, line, file
"<user.cursorless_containing_scope>", # funk, state, class
"<user.cursorless_subtoken>" # first past second word
"<user.cursorless_subtoken>", # first past second word
"<user.cursorless_head_tail>" # head, tail
# "<user.cursorless_inside_outside>", # inner, outer
# "<user.cursorless_surrounding_pair>", # curly, round
# "<user.cursorless_matching_pair_symbol>", # matching
Expand Down

0 comments on commit e9dd8d2

Please sign in to comment.