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