-
-
Notifications
You must be signed in to change notification settings - Fork 198
Markdown Editing
elasticthreads edited this page Mar 7, 2013
·
11 revisions
Note: this has been copied directly from the 2.2 public beta release notes. It might make sense for it to be included as a default note when a new user installs nvALT in the future, with a neater table format perhaps (it's beta, we can forgive rough docs!). But in the meantime I wanted an easier place to find it than digging up the link to the release notes again.
By the way, I generated the Markdown for this GitHub wiki page by using nvALT's "Convert imported URLs to Markdown" feature, dragging in the release notes page. Nearly flawless :-) @ches.
- Note: Unless otherwise noted, you have to "Enable Markdown Completion" in the Preview menu (cmd-shift-m to toggle) for the following to work.
- Cmd > adds a ">" to the start of your current paragraph (i.e. increases quote level)
- Cmd < removes a ">" from the start of your current paragraph (i.e. decreases quote level)
- Cmd + adds a "#" to the start of your current paragraph (i.e. increases header level)
- Cmd - removes a "#" from the start of your current paragraph (i.e. decreases header level)
-
Cmd B Works exactly like bolding/unbolding text, except that it uses
**strong emphasis**
instead of bolding the font. Will wrap/unwrap/rewrap selected text. If no text is selected, this will insert****
and put your cursor in the middle . -
Cmd I Same as with Cmd B, except uses
_emphasis_
instead of**strong emphasis**
-
Link syntax completion. A bit harder to describe. Easier to play around with and see. Basically, you can use the tab key to have nvALT autocomplete some of the syntax around Markdown links. Link syntax completion basically has three variations, and I'll explain below by running you through three tests in a note in nvALT somewhere:
- Create a new line. Type "[1]" (or just "[1" if you have auto-pairing turned on). Hit the tab key. nvALT will turn "[1]" into "[1]: http://", and select "http://". Hit the tab key again to deselect and move the cursor to the end of the line. Type "google.com". You should now have a reference-style link of "[1]: http://google.com"
- Elsewhere in the same note, add some random text so you have an opportunity to now use the reference link we just created. In that paragraph of random text type "[Google]" (or just "[Google" if you use auto-pairing). Now hit tab. nvALT will insert "[]" and put your cursor in the middle. Now type "1". You've now referenced the link from above.
- Move your cursor elsewhere in that same paragraph of random text so you can create an inline-style link. Type "[Googs]" and hit shift-tab. nvALT will add "(http://)" and select "http://". Hit tab or shift-tab again and nvALT will deselect and move the cursor after the "http://" and before the ")". Type "google.com". Now you've got an inline link.
- (Does not require the use of the "Enable Markdown Completion" menu item).
- If you have a URL (and only the URL) on your clipboard, you can hit cmd-option-v (or use "Paste Markdown Link" in the Edit menu) to, yes, paste the URL on your clipboard as a markdown link. nvALT can tell if the cursor is on a new paragraph (and assumes you want to use a reference-style link) or an existing paragraph of text (and assumes you want to use an inline-style link).
- This feature will also paste "around" selected text, using any text you've selected before using the "Paste Markdown Link" command as either the link text (for inline style links) or the reference link name (for reference links). So if you select all the text in a paragraph and Paste Markdown Link, nvALT will use the paragraph as the reference name, wrap it in "[]" and add ": http://the.link.com". Play around with this. It is much easier to see how it works than to explain or read about it.