Command line interface
A shell command like 'marked' which will read html or markdown from a pipe or a file and output it.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 12 Sep, 2011 07:52 PM
Output to Marked, or just output HTML? For the latter, you can just use the command-line version of MultiMarkdown…
Support Staff 2 Posted by Brett on 13 Sep, 2011 12:39 AM
I think that a
marked
command that took piped input or a file parameter and opened the result in Marked could actually be really cool, now that I think about it. I'll look into it this week.3 Posted by Kris on 13 Sep, 2011 12:48 AM
I'd be happy with a simple command line interface to opening a markdown file in Marked, a la the effect of running Marked, hitting ⌘O, and finding that file.
What I'd ultimately like to achieve is a simple way to "watch" a markdown file with Marked from the command line. That would make it super easy to bind a key combo from within Sublime Text, Textmate, Emacs, Vim, etc. to watch the file you've just created and are hacking on.
Support Staff 4 Posted by Brett on 13 Sep, 2011 12:58 AM
That's pretty much what I'm thinking, with the additional ability to accept piped output so it can be chained with commands in other workflows. By the way,
open -a Marked filename.md
will work right now, too. I've used it in TextMate commands, Vim bindings and Sublime Build Systems. I'll be making all of those available soon (hopefully this week).5 Posted by ioa on 13 Sep, 2011 06:01 AM
Indeed, and further there is no need to type all of that in every time. Most UNIX shells allow you to alias longer commands to shortcuts. Try typing in
$ alias marked="open -a Marked"
as a command, then$ marked some_file.md
to test.If you want to keep an alias around between sessions, add it to your .profile (create if it doesn't exist; each line should be seen as a command you type in which will be executed automatically whenever you start a Terminal session).
6 Posted by Kris on 13 Sep, 2011 11:24 AM
Well, then this marks the 1,000,000th time that I've forgotten about
open -a
. It's a tough pill to swallow because I must useopen
10x/day. Thanks!Support Staff 7 Posted by Brett on 13 Sep, 2011 12:14 PM
I think we'll leave it at that for now, then :).