How to set up pandoc shortcut in sublime text 2

install pandoc

  • Suppose you have installed the package control in ST2, then "Command+Shift+P" or "tools > Command Palette" will pop out the dialog.

  • type "install packages"

  • type "pandoc", choose the most general one just with this name.

create short cut

  • In a normal way, you can just open "command palette" by "cmd+shift+p", and then type "pandoc", then type "PDF" or any other format you like.

  • Creating shortcut can help you save the typing "pandoc":

  1. Preferences > Key binding users
  2. Add { "keys": ["ctrl+alt+p"], "command": "pandoc"} in to the file.

For example, after adding, my files looks like:

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

Then in your markdown file, you can just use shortcut "ctrl+alt+p" then type "pdf" you can immediately convert it to pdf.

没有评论:

发表评论