5

I am looking for a terminal based markdown editor which support shortcut keys like ctrl+b which will output **enter bold text here** or something like that to the markdown file. Same way for italics, numbered list, blockquotes, code tags etc. Just like in any GUI based client.

I know there are lot of GUI based editors but I want to know if this kind of behavior is possible in terminal or not. I thought of using autokey like tool and then configuring it and all but before doing that I want to know if there is a terminal based markdown editor that has this feature already present in it. Thanks!

EDIT - Current Solution

I have just setup autokey tool to provide me this feature. I am gonna share this solution if someone else wants this feature.

1) Install Autokey using apt-get install autokey

2) Open Autokey and create new scripts.

The window filter is set to the below mentioned value. Since it uses regex, I basically use terminator as default console terminal and sublime text as GUI editor.

terminator.Terminator|sublime_text

You can modify above depending on where you want to use the below shortcuts

The scripts are

1) MKDImage - ctrl+shft+i (Using shift because it won't interfere with nano editor in terminal)

output = "![Alttext](url \"title\")"
keyboard.send_keys(output)

2) MKDLink - ctrl+shift+l

output = "![]()\"Title\""
keyboard.send_keys(output)

3) MKDCode - ctrl+shift+k

output = "\t {% highlight }% \n {% endhighlight %}" #Actually this is specific to jekyll blogs!
keyboard.send_keys(output)

4) MKDBold - ctrl+shift+b (Same can be done for italics)

output = "****"
keyboard.send_keys(output)

Likewise many more can be made. I will just continue using this until I find a way to get this done directly through terminal based editors.

3
  • 1
    Thanks for sharing you findings. However, it's usually better to post your solution as an answer instead of editing your post. Oct 8, 2014 at 9:04
  • @Glutanimate Actually, I think this does not qualify as an answer to the question. This is just a temporary solution I am using. The question is that I want a better solution than this. :)
    – Bhavyanshu
    Oct 8, 2014 at 9:10
  • 2
    You could set up vim to do those things, but I can't find a ready plugin. :/
    – muru
    Oct 8, 2014 at 9:11

1 Answer 1

2

The program emacs has a Markdown plugin that you can read about here: http://jblevins.org/projects/markdown-mode/

However, emacs has a very VERY steep learning curve as to how to use it. That page documents the shortcuts that are available, but you'll have to find other resources to find out what exactly they mean

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .