Skip to content

Be smarter about inserting one or multiple keywords into code #1942

@nriley

Description

@nriley

The current user.code_keyword action has several deficiencies.

  • It does not attempt to insert or remove spacing between consecutive keywords
  • it calls the insert action multiple times instead of joining together the keywords
  • it does not attempt to examine the document context to understand if a leading or trailing space should be removed or added
  • it has a name which is not intention revealing

@AndreasArvidsson has solutions to some of these issues in his own repository.

https://github.com/AndreasArvidsson/andreas-talon/blob/4327ba6d4f0420c7a8deb8148c74e832b6537f93/languages/tags/code_keywords.py#L10-L13

https://github.com/AndreasArvidsson/andreas-talon/blob/4327ba6d4f0420c7a8deb8148c74e832b6537f93/core/edit/edit.py#L124-L138

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions