facelessuser / MarkdownPreview

Markdown preview and build plugin for Sublime Text https://facelessuser.github.io/MarkdownPreview/
Other
405 stars 53 forks source link

Key binding not working when parser selected #94

Closed rigwild closed 4 years ago

rigwild commented 4 years ago

Hello,

I noticed that when you enable only one parser in your configuration file:

{
  "enabled_parsers": ["markdown"]
}

And you create a key binding like the following:

[
  { "keys": ["ctrl+alt+b"], "command": "markdown_preview_select", "args": {"target": "browser", "parser":"markdown"} }
]

Nothing happens when you hit the keyboard shortcut.

I fixed it by not specifying the parser in the key binding but that was not obvious to understand.

[
  { "keys": ["ctrl+alt+b"], "command": "markdown_preview_select", "args": {"target": "browser"} }
]

Maybe it should be fixed (if doable without huge changes), or at least specified in the documentation.

Have a nice day :grinning:

facelessuser commented 4 years ago

That command doesn't take a parser argument: https://github.com/facelessuser/MarkdownPreview/blob/master/markdown_preview.py#L995.

It didn't run most likely because it was throwing an error for to too many arguments being passed.

rigwild commented 4 years ago

My bad, I copied pasted from https://facelessuser.github.io/MarkdownPreview/usage/#to-preview

Did not see it was not the same command in the examples.

facelessuser commented 4 years ago

No worries :).