Skip to content

Commit

Permalink
Update shortcut keys for Windows compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
wereturtle committed Sep 27, 2015
1 parent cf5e19a commit 31c8d8a
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 43 deletions.
83 changes: 58 additions & 25 deletions resources/quickreferenceguide.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</head>
<body>
<h1 id="introduction">Introduction</h1>
<p>Welcome to <em>ghostwriter</em>! This quick reference guide gives examples of writing in Markdown, a plain text markup format created by John Gruber. For more information and help, please visit John Gruber’s website at <a href="http://www.daringfireball.net">http://www.daringfireball.net</a>. The official <em>ghostwriter</em> website can be found at <a href="http://www.github.com/wereturtle/ghostwriter">http://www.github.com/wereturtle/ghostwriter</a>.</p>
<p>Welcome to <em>ghostwriter</em>! This quick reference guide gives examples of writing in Markdown, a plain text markup format created by John Gruber. For more information and help, please visit John Gruber’s website at <a href="http://www.daringfireball.net" class="uri">http://www.daringfireball.net</a>. The official <em>ghostwriter</em> website can be found at <a href="http://www.github.com/wereturtle/ghostwriter" class="uri">http://www.github.com/wereturtle/ghostwriter</a>.</p>
<p><em>ghostwriter</em> has built-in support for the Sundown processor. However, it also can auto-detect Pandoc, MultiMarkdown, Discount, or cmark processors. To use any or all of the latter three, simply install them and ensure that their installation locations are added to your system’s <code>PATH</code> environment variable. <em>ghostwriter</em> will auto-detect their installation on startup, and give you live HTML preview and export options accordingly.</p>
<h1 id="headings">Headings</h1>
<pre><code># Level 1 Heading
Expand Down Expand Up @@ -122,59 +122,86 @@ <h1 id="markdown-extensions">Markdown Extensions</h1>
Row Text 1 | Row Text 2</code></pre>
<p>There are even more table syntaxes that these Markdown processors can support. There are also many more extensions. For more information on these processors, please visit the following websites:</p>
<ul>
<li>Sundown: <a href="http://github.com/vmg/sundown/">http://github.com/vmg/sundown/</a></li>
<li>Pandoc: <a href="http://johnmacfarlane.net/pandoc/">http://johnmacfarlane.net/pandoc/</a></li>
<li>MultiMarkdown: <a href="http://fletcherpenney.net/multimarkdown/">http://fletcherpenney.net/multimarkdown/</a></li>
<li>Discount: <a href="http://www.pell.portland.or.us/~orc/Code/discount/">http://www.pell.portland.or.us/~orc/Code/discount/</a></li>
<li>cmark: <a href="http://github.com/jgm/cmark/">http://github.com/jgm/cmark/</a></li>
<li>Sundown: <a href="http://github.com/vmg/sundown/" class="uri">http://github.com/vmg/sundown/</a></li>
<li>Pandoc: <a href="http://johnmacfarlane.net/pandoc/" class="uri">http://johnmacfarlane.net/pandoc/</a></li>
<li>MultiMarkdown: <a href="http://fletcherpenney.net/multimarkdown/" class="uri">http://fletcherpenney.net/multimarkdown/</a></li>
<li>Discount: <a href="http://www.pell.portland.or.us/~orc/Code/discount/" class="uri">http://www.pell.portland.or.us/~orc/Code/discount/</a></li>
<li>cmark: <a href="http://github.com/jgm/cmark/" class="uri">http://github.com/jgm/cmark/</a></li>
</ul>
<p>The original John Gruber Markdown specification can be found at <a href="http://daringfireball.net/projects/markdown/">http://daringfireball.net/projects/markdown/</a>.</p>
<p>The original John Gruber Markdown specification can be found at <a href="http://daringfireball.net/projects/markdown/" class="uri">http://daringfireball.net/projects/markdown/</a>.</p>
<h1 id="ghostwriter-shortcuts">Ghostwriter Shortcuts</h1>
<p><em>ghostwriter</em> supports several shortcut keys for editing Markdown:</p>
<dl>
<dt><code>Ctrl+B</code></dt>
<dd><p>Applies bold (strong) formatting.</p>
<dd>Applies bold (strong) formatting.
</dd>
<dt><code>Ctrl+I</code></dt>
<dd><p>Applies italic (emphasis) formatting.</p>
<dd>Applies italic (emphasis) formatting.
</dd>
<dt><code>Ctrl+K</code></dt>
<dd><p>Applies strikethrough formatting.</p>
<dd>Applies strikethrough formatting.
</dd>
<dt><code>Ctrl+&lt;</code></dt>
<dd><p>Pressing the <code>Ctrl</code> key with the <code>&lt;</code> character (<code>Ctrl+Shift+,</code>) inserts an HTML comment at the cursor position, or will turn selected text into an HTML comment.</p>
<dt><code>Ctrl+/</code></dt>
<dd>Pressing the <code>Ctrl</code> key with the <code>/</code> character inserts an HTML comment at the cursor position, or will turn selected text into an HTML comment.
</dd>
<dt><code>Tab</code></dt>
<dd><p>When text is selected in the editor, pressing the tab key will indent the selected lines of text.</p>
<dd>When text is selected in the editor, pressing the tab key will indent the selected lines of text.
</dd>
<dt><code>Shift+Tab</code></dt>
<dd><p>When text is selected in the editor, pressing the Shift and Tab keys together will unindent the selected lines of text.</p>
<dd>When text is selected in the editor, pressing the Shift and Tab keys together will unindent the selected lines of text.
</dd>
<dt><code>Shift+Enter</code></dt>
<dd><p>Inserts a Markdown-style line break.</p>
<dd>Inserts a Markdown-style line break.
</dd>
<dt><code>&gt;</code></dt>
<dd><p>When text is selected in the editor, pressing the <code>&gt;</code> character (<code>Shift+.</code>) will create a block quote from the selected lines of text.</p>
<dt><code>Ctrl+Enter</code></dt>
<dd>Inserts a line break as usual, except the current indentation will not be honored. In other words, if you are typing on an indented line and press <code>Ctrl+Enter</code>, no indentation will be added to new line. Note that the <code>Ctrl</code> modifier can be combined with the <code>Shift</code> modifier to produce both an unindented line and a Markdown-style line break.
</dd>
<dt><code>Ctrl+&gt;</code></dt>
<dd><p>When text is selected in the editor, pressing <code>Ctrl</code> with the <code>&gt;</code> character (<code>Ctrl+Shift+.</code>) will remove any block quote formatting from the selected lines of text.</p>
<dt><code>Ctrl+.</code></dt>
<dd>Pressing <code>Ctrl</code> with the <code>.</code> character turns the current line or the selected lines into a block quote.
</dd>
<dt><code>Ctrl+*</code></dt>
<dd><p>Pressing <code>Ctrl</code> with the <code>*</code> character (<code>Ctrl+Shift+8</code>) turns the current line or the selected lines into a bullet list. For example, if you have selected text within the following lines:</p>
<dt><code>Ctrl+,</code></dt>
<dd>Pressing <code>Ctrl</code> with the <code>,</code> character will remove any block quote formatting from the current line or the selected lines of text.
</dd>
<dt><code>Alt+8</code></dt>
<dd><p>Pressing <code>Alt</code> with the <code>8</code> character turns the current line or the selected lines into a bullet list with the <code>*</code> marker. For example, if you have selected text within the following lines:</p>
<pre><code>List item one.
List item two.</code></pre>
<p>Pressing <code>Ctrl+*</code> will turn the selected lines into a task list like so:</p>
<p>Pressing <code>Alt+8</code> will turn the selected lines into a bullet list like so:</p>
<pre><code>* List item one.
* List item two.</code></pre>
</dd>
<dt><code>Ctrl+1</code></dt>
<dd><p>Pressing <code>Ctrl</code> with the <code>1</code> (number 1) character turns the current line or the selected lines into a numbered list. For example, if you have selected text within the following lines:</p>
<dt><code>Alt+-</code></dt>
<dd><p>Pressing <code>Alt</code> with the <code>-</code> character turns the current line or the selected lines into a bullet list with the <code>-</code> marker. For example, if you have selected text within the following lines:</p>
<pre><code>List item one.
List item two.</code></pre>
<p>Pressing <code>Alt+-</code> will turn the selected lines into a bullet list like so:</p>
<pre><code>- List item one.
- List item two.</code></pre>
</dd>
<dt><code>Alt+=</code></dt>
<dd><p>Pressing <code>Alt</code> with the <code>=</code> character turns the current line or the selected lines into a bullet list with the <code>+</code> marker. For example, if you have selected text within the following lines:</p>
<pre><code>List item one.
List item two.</code></pre>
<p>Pressing <code>Ctrl+1</code> will turn the selected lines into a task list like so:</p>
<p>Pressing <code>Alt++</code> will turn the selected lines into a bullet list like so:</p>
<pre><code>+ List item one.
+ List item two.</code></pre>
</dd>
<dt><code>Alt+1</code></dt>
<dd><p>Pressing <code>Alt</code> with the <code>1</code> (number 1) character turns the current line or the selected lines into a numbered list with the <code>.</code> marker. For example, if you have selected text within the following lines:</p>
<pre><code>List item one.
List item two.</code></pre>
<p>Pressing <code>Alt+1</code> will turn the selected lines into a numbered list like so:</p>
<pre><code>1. List item one.
2. List item two.</code></pre>
</dd>
<dt><code>Alt+0</code></dt>
<dd><p>Pressing <code>Alt</code> with the <code>0</code> character turns the current line or the selected lines into a numbered list with the <code>)</code> marker. For example, if you have selected text within the following lines:</p>
<pre><code>List item one.
List item two.</code></pre>
<p>Pressing <code>Alt+0</code> will turn the selected lines into a numbered list like so:</p>
<pre><code>1) List item one.
2) List item two.</code></pre>
</dd>
<dt><code>Ctrl+T</code></dt>
<dd><p>Pressing <code>Ctrl+T</code> turns the current line or the selected lines into a Github-Flavored Markdown task list item. For example, if you have selected text within the following lines:</p>
<pre><code>Important thing to do.
Expand Down Expand Up @@ -238,6 +265,12 @@ <h1 id="ghostwriter-shortcuts">Ghostwriter Shortcuts</h1>
</table>
<p>To enable auto-matching of characters as you type, check “Automatically Match Characters while Typing” from the Settings menu in the menu bar.</p>
</dd>
<dt>Drag and Drop Image Files</dt>
<dd><p>Rather than going to the Edit menu and selecting the “Insert Image…” option, you can drag and drop any image file from your file system into the editor window. The application will insert inline image text with your image’s file path relative to the currently opened document’s location, or the full path if the document is untitled. For example:</p>
<pre><code>![](../../relative/path/to/your/file.png)</code></pre>
<p>or if the document is untitled:</p>
<pre><code>![](file:///full/path/to/your/file.png)</code></pre>
</dd>
</dl>
<hr />
<p>Copyright (c) 2014, 2015 <a href="http://www.github.com/wereturtle">wereturtle</a></p>
Expand Down
26 changes: 13 additions & 13 deletions resources/quickreferenceguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,19 @@ The original John Gruber Markdown specification can be found at <http://daringfi
`Ctrl+Enter`
: Inserts a line break as usual, except the current indentation will not be honored. In other words, if you are typing on an indented line and press `Ctrl+Enter`, no indentation will be added to new line. Note that the `Ctrl` modifier can be combined with the `Shift` modifier to produce both an unindented line and a Markdown-style line break.

`Ctrl+>`
: Pressing `Ctrl` with the `>` character (`Ctrl+Shift+.`) turns the current line or the selected lines into a block quote.
`Ctrl+.`
: Pressing `Ctrl` with the `.` character turns the current line or the selected lines into a block quote.

`Ctrl+<`
: Pressing `Ctrl` with the `<` character (`Ctrl+Shift+,`) will remove any block quote formatting from the current line or the selected lines of text.
`Ctrl+,`
: Pressing `Ctrl` with the `,` character will remove any block quote formatting from the current line or the selected lines of text.

`Alt+*`
: Pressing `Alt` with the `*` character (`Alt+Shift+8`) turns the current line or the selected lines into a bullet list with the `*` marker. For example, if you have selected text within the following lines:
`Alt+8`
: Pressing `Alt` with the `8` character turns the current line or the selected lines into a bullet list with the `*` marker. For example, if you have selected text within the following lines:

List item one.
List item two.
Pressing `Alt+*` will turn the selected lines into a bullet list like so:
Pressing `Alt+8` will turn the selected lines into a bullet list like so:

* List item one.
* List item two.
Expand All @@ -228,8 +228,8 @@ The original John Gruber Markdown specification can be found at <http://daringfi
- List item one.
- List item two.

`Alt++`
: Pressing `Alt` with the `+` character (`Alt+Shift+=`) turns the current line or the selected lines into a bullet list with the `+` marker. For example, if you have selected text within the following lines:
`Alt+=`
: Pressing `Alt` with the `=` character turns the current line or the selected lines into a bullet list with the `+` marker. For example, if you have selected text within the following lines:

List item one.
List item two.
Expand All @@ -250,13 +250,13 @@ The original John Gruber Markdown specification can be found at <http://daringfi
1. List item one.
2. List item two.

`Alt+)`
: Pressing `Alt` with the `)` character (`Alt+Shift+0`) turns the current line or the selected lines into a numbered list with the `)` marker. For example, if you have selected text within the following lines:
`Alt+0`
: Pressing `Alt` with the `0` character turns the current line or the selected lines into a numbered list with the `)` marker. For example, if you have selected text within the following lines:

List item one.
List item two.
Pressing `Alt+)` will turn the selected lines into a numbered list like so:
Pressing `Alt+0` will turn the selected lines into a numbered list like so:

1) List item one.
2) List item two.
Expand Down Expand Up @@ -293,7 +293,7 @@ The original John Gruber Markdown specification can be found at <http://daringfi
`` ` `` | `` ` ``
`<` | `>`

To enable auto-matching of characters as you type, check "Auto-match Characters while Typing" from the Settings menu in the menu bar.
To enable auto-matching of characters as you type, check "Automatically Match Characters while Typing" from the Settings menu in the menu bar.

Drag and Drop Image Files
: Rather than going to the Edit menu and selecting the "Insert Image..." option, you can drag and drop any image file from your file system into the editor window. The application will insert inline image text with your image's file path relative to the currently opened document's location, or the full path if the document is untitled. For example:
Expand Down
10 changes: 5 additions & 5 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1000,15 +1000,15 @@ void MainWindow::buildMenuBar()
formatMenu->addAction(tr("I&ndent"), editor, SLOT(indentText()), QKeySequence("Tab"));
formatMenu->addAction(tr("&Unindent"), editor, SLOT(unindentText()), QKeySequence("Shift+Tab"));
formatMenu->addSeparator();
formatMenu->addAction(tr("Block &Quote"), editor, SLOT(createBlockquote()), QKeySequence("Ctrl+>"));
formatMenu->addAction(tr("&Strip Block Quote"), editor, SLOT(removeBlockquote()), QKeySequence("Ctrl+<"));
formatMenu->addAction(tr("Block &Quote"), editor, SLOT(createBlockquote()), QKeySequence("Ctrl+."));
formatMenu->addAction(tr("&Strip Block Quote"), editor, SLOT(removeBlockquote()), QKeySequence("Ctrl+,"));
formatMenu->addSeparator();
formatMenu->addAction(tr("&* Bullet List"), editor, SLOT(createBulletListWithAsteriskMarker()), QKeySequence("Alt+*"));
formatMenu->addAction(tr("&* Bullet List"), editor, SLOT(createBulletListWithAsteriskMarker()), QKeySequence("Alt+8"));
formatMenu->addAction(tr("&- Bullet List"), editor, SLOT(createBulletListWithMinusMarker()), QKeySequence("Alt+-"));
formatMenu->addAction(tr("&+ Bullet List"), editor, SLOT(createBulletListWithPlusMarker()), QKeySequence("Alt++"));
formatMenu->addAction(tr("&+ Bullet List"), editor, SLOT(createBulletListWithPlusMarker()), QKeySequence("Alt+="));
formatMenu->addSeparator();
formatMenu->addAction(tr("1&. Numbered List"), editor, SLOT(createNumberedListWithPeriodMarker()), QKeySequence("Alt+1"));
formatMenu->addAction(tr("1&) Numbered List"), editor, SLOT(createNumberedListWithParenthesisMarker()), QKeySequence("Alt+)"));
formatMenu->addAction(tr("1&) Numbered List"), editor, SLOT(createNumberedListWithParenthesisMarker()), QKeySequence("Alt+0"));
formatMenu->addSeparator();
formatMenu->addAction(tr("&Task List"), editor, SLOT(createTaskList()), QKeySequence("Ctrl+T"));
formatMenu->addAction(tr("Toggle Task(s) &Complete"), editor, SLOT(toggleTaskComplete()), QKeySequence("Ctrl+D"));
Expand Down

0 comments on commit 31c8d8a

Please sign in to comment.