facelessuser / MarkdownPreview

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

save to html shortcut #142

Closed kurokirasama closed 2 years ago

kurokirasama commented 2 years ago

Hello, is there a shortcut for this? And if yes, can I change it? I haven't able to find how to do it so far...

facelessuser commented 2 years ago

Just run Sublime's build shortcut. I think on macOS it's cmd + b. Not sure off the top of my head what it is on Windows and Linux.

facelessuser commented 2 years ago

Probably ctrl + b on Linux and Windows...

kurokirasama commented 2 years ago

the problem i have with that shortcut, is that I usually work on different builds, python, R, C, matlab, latex, etc. So I change between them regularly. For every one of them, I have a sublime-build file, and the a shortcut to that build, for example:

{
"cmd" : ["R CMD SHLIB '$file_name'"], 
"selector" : "source.c",
"shell": true,
"working_dir" : "$file_path"
}

is saved in a file called RC.sublime-build.

Then I create a shortcut like this:

{
        "keys": ["ctrl+shift+alt+r"],
        "command": "set_build_system",
        "args": {
            "file": "Packages/User/RC.sublime-build"
        }
    }

That way, I can change between builds easily. It would solve my question if there was a way to define a sublime-buid file for the save to htmloption. I've been looking around with no luck. It is possible?

I did found this:

   { 
        "keys": ["alt+m"], 
        "command": "markdown_preview", 
        "args": {
            "target": "browser", 
            "parser":"markdown"
        }
    }

Is there an equivalent to markdown_preview but for save to html?

facelessuser commented 2 years ago

The command would be markdown_build.

kurokirasama commented 2 years ago

coool!!! thanks! What would be the target? EDIT: already figure out, no args!

facelessuser commented 2 years ago

It doesn't take one, not via the shortcut. The build action gets it's inputs from the settings files: https://facelessuser.github.io/MarkdownPreview/usage/#to-build.

facelessuser commented 2 years ago

Yup. I'll go ahead and close this issue as it seems you have what you need.