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

Context for mark mode ? #56

Closed
aviatesk opened this issue Jan 22, 2019 · 4 comments
Closed

Context for mark mode ? #56

aviatesk opened this issue Jan 22, 2019 · 4 comments

Comments

@aviatesk
Copy link

Could you provide context for mark mode which is available in when clause ?

For example, say, in a case when we want to do define per-paragraph jump with Space Block Jumpter package, we need context like inMarkMode below available in when clause.

keybindings.json

/* Enable per-paragraph jump */
{
    "key": "ctrl+b",
    "command": "spaceBlockJumper.moveDown"
},
{
    "key": "ctrl+b",
    "command": "spaceBlockJumper.selectDown",
    "when": "inMarkMode && editorTextFocus"
}

This can be done to some extent with default when: "editorHasSelection" context, but it just works only when we have selection, not at the very start of mark mode...

@whitphx
Copy link
Owner

whitphx commented Jan 23, 2019

Thank you for the suggestion. I will consider it.

memo: Use "setContext" command (which is not a proper command yet?)

@whitphx
Copy link
Owner

whitphx commented Jan 23, 2019

Released in v0.4.0!

@aviatesk
Copy link
Author

Thanks for your super quick response & enhancement !
I confirmed the context works very fine.

{
    "key": "ctrl+b",
    "command": "spaceBlockJumper.selectDown",
    "when": "emacs-mcx.inMarkMode && editorTextFocus"
},
{
    "key": "ctrl+u",
    "command": "spaceBlockJumper.selectUp",
    "when": "emacs-mcx.inMarkMode && editorTextFocus"
},
...

And beyond all, thanks for your great package itself !

@gpaul
Copy link

gpaul commented Jun 18, 2019

I came here looking exactly for this, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants