Ubuntu – A terminal based markdown editor that supports shortcuts

command linemarkdownshortcut-keyssoftware-recommendationtext-editor

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.

Best Answer

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