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

Make using builtin commands / metas more user-friendly. #1069

Merged

Conversation

benoit-pierre
Copy link
Member

Add user-friendly names for builtin metas (e.g. {:retro_currency:$c}), and ignore case when processing builtins commands / metas (so {PloveR:toggle} or {:mode:Camel} will work as expected).

Fix #688 and #870.

plover/engine.py Outdated Show resolved Hide resolved
Copy link
Member

@morinted morinted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the behavior of {:attach}? Would it be like {:attach:^ing}, with {:attach:word} having no effect?

plover/formatting.py Show resolved Hide resolved
@morinted
Copy link
Member

morinted commented Jun 2, 2019

We may also consider affix over attach

@benoit-pierre
Copy link
Member Author

What is the behavior of {:attach}? Would it be like {:attach:^ing}, with {:attach:word} having no effect?

    def test_meta_attach_4(self):
        r'''
        'TEFT': 'test',
        'AT': '{:attach:attach}',

        TEFT/AT  ' test attach'
        '''

@benoit-pierre
Copy link
Member Author

We may also consider affix over attach

Sure, do if you think it's clearer, do you want me to change it?

@benoit-pierre
Copy link
Member Author

Regarding the behavior of {:attach:attach}, we could change it so it's equivalent to {:attach:^attach^}.

@morinted
Copy link
Member

morinted commented Apr 1, 2020

Regarding the behavior of {:attach:attach}, we could change it so it's equivalent to {:attach:^attach^}.

I like both of these suggestions if you want to add the changes to this PR

@benoit-pierre
Copy link
Member Author

@morinted: I changed the default for {:attach:attach}. Just to be clear, you want also the meta to be renamed to affix?

@morinted
Copy link
Member

morinted commented Apr 5, 2020

Thanks for the changes. I think "affix" is more technically correct, but "attach" will probably be easier to understand for users. Let's merge as-is.

@benoit-pierre benoit-pierre merged commit 5e8b8eb into openstenoproject:master Apr 6, 2020
@benoit-pierre benoit-pierre deleted the formatting_metas branch April 6, 2020 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Commands should be made case-insensitive
3 participants