Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit use of modes #603

Open
5 of 8 tasks
pokey opened this issue Sep 22, 2021 · 3 comments
Open
5 of 8 tasks

Revisit use of modes #603

pokey opened this issue Sep 22, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@pokey
Copy link
Collaborator

pokey commented Sep 22, 2021

The problem

We have had issues in the past where commands are unexpectedly active in sleep mode, eg #561. The problem is that if you put mode: in a .talon file header, you disable the implicit mode: command, which in turn allows you to enable the file during sleep accidentally.

A quick search reveals that we still have some commands active in sleep mode for this reason. See eg go.talon, which results in go commands being active if talon is sleeping while you have a go file open.

The solution

We may want to prefer using tags in many of the places that we use modes today. For example, the following modes are good candidates to become tags:

  • user.homophones
  • user.windbg
  • user.help
  • user.help_scope
  • all programming language modes
  • admin
  • debug
  • ida

On the other hand, things like "game" or "solo" would be examples of good, general modes, because a mode should ideally be very transformative of the command set and make sense when enabled by itself.

@splondike splondike added the enhancement New feature or request label Sep 26, 2021
@knausj85
Copy link
Member

related: talonvoice/talon#239

@AndreasArvidsson
Copy link
Collaborator

@pokey @knausj85
I've created a solution where we are back to a single line header for each language. This time using a tag.

tag: user.typescript
-

https://github.com/AndreasArvidsson/andreas-talon/blob/master/langs/javascript/typescript.talon
https://github.com/AndreasArvidsson/andreas-talon/blob/master/misc/language_mode/language_mode.py

@AndreasArvidsson
Copy link
Collaborator

I have now made a pr to update the programming languages to use tags instead
#776

@knausj85 knausj85 mentioned this issue Apr 9, 2023
knausj85 added a commit that referenced this issue Apr 23, 2023
- Switch gdb and windbg to tags

Addresses the remainder of
#603

Probably most relevant to @fidgetingbits

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
MartinRykfors pushed a commit to MartinRykfors/knausj_talon that referenced this issue Jul 4, 2023
- Switch gdb and windbg to tags

Addresses the remainder of
talonhub#603

Probably most relevant to @fidgetingbits

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
blyons333 pushed a commit to blyons333/knausj_talon that referenced this issue Aug 11, 2023
- Switch gdb and windbg to tags

Addresses the remainder of
talonhub#603

Probably most relevant to @fidgetingbits

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants