diff --git a/BREAKING_CHANGES.txt b/BREAKING_CHANGES.txt index 6c9d44c4b9..117edd9034 100644 --- a/BREAKING_CHANGES.txt +++ b/BREAKING_CHANGES.txt @@ -6,7 +6,11 @@ applied given the delay between changes being submitted and the time they were r and merged. --- -* 2023-06-06 Deprecate `go marks` command for VSCode. Use 'bar marks' instead. +* 2024-01-27 Deprecate '' command without a spoken prefix like `numb`. +See `numbers.talon` and `numbers_unprefixed.talon.` If in the future you want to still use +unprefixed numbers, you will need to comment out the +`tag(): user.prefixed_numbers` line in your `settings.talon` file. +* 2023-06-06 Deprecate `go ` command for VSCode. Use 'bar marks' instead. * 2023-02-04 Deprecate `murder` command for i3wm. Use 'win kill' instead. * 2022-12-11 Deprecate user.insert_with_history. Just use `user.add_phrase_to_history(text); insert(text)` instead. See #939. diff --git a/core/mouse_grid/mouse_grid_open.talon b/core/mouse_grid/mouse_grid_open.talon index 0c4c838f16..ac517ab158 100644 --- a/core/mouse_grid/mouse_grid_open.talon +++ b/core/mouse_grid/mouse_grid_open.talon @@ -1,5 +1,7 @@ tag: user.mouse_grid_showing - +# Force prefixed numbers elsewhere in the config, which allows unprefixed use below +tag(): user.prefixed_numbers : user.grid_narrow(number_key) grid off: user.grid_close() diff --git a/core/numbers/numbers.py b/core/numbers/numbers.py index 2f757c6ef2..f19c656d78 100644 --- a/core/numbers/numbers.py +++ b/core/numbers/numbers.py @@ -177,6 +177,7 @@ def split_list(value, l: list) -> Iterator: number_small_map = {n: i for i, n in enumerate(number_small_list)} mod.list("number_small", desc="List of small numbers") +mod.tag("prefixed_numbers", desc="Require prefix when saying a number") ctx.lists["self.number_small"] = number_small_map.keys() diff --git a/core/numbers/numbers.talon b/core/numbers/numbers.talon index f6783512f9..4d349a6447 100644 --- a/core/numbers/numbers.talon +++ b/core/numbers/numbers.talon @@ -1,3 +1 @@ -not tag: user.mouse_grid_showing -- -: "{number_string}" +numb : "{number_string}" diff --git a/core/numbers/numbers_unprefixed.talon b/core/numbers/numbers_unprefixed.talon new file mode 100644 index 0000000000..9aac81ea15 --- /dev/null +++ b/core/numbers/numbers_unprefixed.talon @@ -0,0 +1,5 @@ +not tag: user.prefixed_numbers +- +: + insert("{number_string}") + user.deprecate_command("2024-01-27", "", "numb ") diff --git a/settings.talon b/settings.talon index f4b82fa8c2..5d5867fc7d 100644 --- a/settings.talon +++ b/settings.talon @@ -70,3 +70,9 @@ settings(): # Uncomment to enable the curse yes/curse no commands (show/hide mouse cursor). # See issue #688 for more detail: https://github.com/talonhub/community/issues/688 # tag(): user.mouse_cursor_commands_enable + +# Uncomment the below to disable support for saying numbers without a prefix. +# By default saying "one" would write "1", however many users find this behavior +# prone to false positives. If you uncomment this, you will need to say +# "numb one" to write "1". Note that this tag will eventually be activated by default +# tag(): user.prefixed_numbers