Last update October 1, 2020
This is a large file that I have in markdown, which I print, make Word documents, etc. To make it usable on a site, I'm going to break it out. But, until then, I'm keeping the whole shebang together.Another question I'm going to have is how to maintain a print edition.
There are a lot of random keystrokes for stuff. Most of it is not an advantage over just typing.
Keystroke | Function |
---|---|
C-c C-l |
markdown-insert-link. It prompts. Output is [text](url) |
C-c C-i |
markdown-insert-image. Outputs ![alt text](url) |
C-c C-s i |
Word or region italics |
C-c C-s b |
Word or region bold |
C-c C-s c |
Word or region inline code |
C-c C-s k |
Keyboard tag |
C-c C-s - |
Horizontal Rule |
C-c C-s f |
Footnote. Puts it at the bottom of the page. |
Run from first column.
Keystroke | Function |
---|---|
C-c LEFT |
Moves the item in the outline left ("promotes") |
C-c RIGHT |
Moves the item in the outline right ("demotes") |
C-c UP |
Move tree up in the outline |
C-c DOWN |
Move tree down in the outline |
Simplenote is a web-based notetaking application, similar to Evernote or OneNote. It takes notes as plain text, but can also support MarkDown. It does lack some capabilities I would like (the ability to suck down a web page or take images), but it’s a good option. In addition to a browser interface and desktop/mobile apps, there is an elisp module, simplenote2.el
, to access it. While there are keyboard shortcuts, I’ve mostly run these through M-x
.
Command | Function |
---|---|
simplenote2-sync-notes |
Syncronize notes between the local instance and the server. |
simplenote2-browse |
Opens a window to browse, create, and delete notes. |
simplenote2-create-note-from-buffer |
Turns the current buffer into a note. |
simplenote2-set-markdown |
Sets the bit on the current note to be Markdown formatted. |
C-u M-x simplenote2-set-markdown |
Unsets the Markdown bit |
simplenote2-push-buffer |
Pushes the modificaitions added to the currently note |
simplenote2-pull-buffer |
Refreshes current note from the server |
simplenote2-add-tag |
Adds a tag to a note. |
simplenote2-delete-tag |
Adds a tag to a note. |
Most of this is from markdownguide.org.
Format | Code | Example |
---|---|---|
Bold | **bold** |
bold |
Italics | *italics* |
italics |
Bold and Italic | ***bold and italic*** |
bold and italic |
Code | code |
code |
Strikethrough | ~~strikethrough~~ |
|
Superscript | Text^Super^ |
TextSuper |
Subscript | Text~Sub~ |
TextSub |
Three or more asterisks ( ***
), dashes ( ---
), or underscores ( ___
) on a line by themselves.
Example:
---
Start and end the section with three backticks or tildes on a row on their own.
Backtick example:
```
Line 1
Line 2
Line 3
```
Produces:
Line 1
Line 2
Line 3
Tilde example:
~~~
Line A
Line B
Line C
~~~
Produces:
Line A
Line B
Line C
Just add hashes in front:
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Number followed by a period. The numbers don't matter--a good Markdown converter will figure it out.
So:
1. First Item
2. Second Item
3. Third Item
Would be:
Indented items become subitems:
1. First Item
1. First Subitem
2. Second Subitem
2. Second Item
3. Third Item
Would be:
Use asterisk (*
), dash (-
), or plus signs (+
). I tend to use asterisks.
So...
* First Item
* Second Item
* Third Item
Is
It can be structured:
* First Item
* First Subitem
* Second Subitem
* Second Item
* Third Item
Is
1. First Item
* First Subitem
* Second Subitem
2. Second Item
3. Third Item
Would be:
Use pipes (|
) to delineate columns. Top row delineated with three or more dashes (---
) per column.
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Row 1 | Row 1 | Row 1 |
| Row 2 | Row 2 (Columns don't have to be even) | Row 2 |
| Row 3 | Row 3 | Row 3 |
Produces
Header 1 | Header 2 | Header 3 |
---|---|---|
Row 1 | Row 1 | Row 1 |
Row 2 | Row 2 (Columns don’t have to be even) | Row 2 |
Row 3 | Row 3 | Row 3 |
Colons (:
) on the dash row suggest alignment.
| Header 1 | Header 2 | Header 3 |
| :------- | :------: | -------: |
| Row 1 | Row 1 | Row 1 |
| Row 2 | Row 2 | Row 2 |
| Row 3 | Row 3 | Row 3 |
Header 1 | Header 2 | Header 3 |
---|---|---|
Row 1 | Row 1 | Row 1 |
Row 2 | Row 2 | Row 2 |
Row 3 | Row 3 | Row 3 |
Within tmux, there is a key prefix for commands. Default is C-b
. To access a command line, it's prefix then colon (C-b :
).
This is from the command line.
Start new:
tmux
...or with a name:
tmux new -s
session name
What sessions am I running: tmux list-sessions
or tmux ls
Attaching...
tmux attach
tmux attach
session numbertmux attach -t
session nameKilling a session: tmux kill-session
session number or tmux kill-session -t
session name
Detaching from a session: C-b d
Display time: C-b t
Panes are splits within a screen.
Keystroke | Function |
---|---|
C-b % |
Split vertically |
C-b " |
Split horizontally |
C-b ARROW |
Move to pane in the direction of the arrow |
C-b x |
Kill pane |
C-b o |
Swap panes |
C-b { |
Move current pane left |
C-b } |
Move current pane right |
Windows replace what's in your terminal session. Think of a virtual screen in a GUI system.
Keystroke | Function |
---|---|
C-b c |
Create window |
C-b n |
Next window |
C-b p |
Previous window |
C-b number |
Jump to window number number |
C-b , |
Name window |
C-b & |
Kill window |
This is a handy conversion tool for various formats. At it's most basic:
pandoc
input file -f
input format -t
output format -o
output filename
Format Code | Description | Notes |
---|---|---|
asciidoc | ASCII Doc | Output Only |
beamer | LaTeX beamer slide show | Output Only |
commonmark | CommonMark Markdown | |
context | ConTeXt | Output Only |
creole | Creole 1.0 | Input Only |
docbook | DocBook | Input Only |
docbook or docbook4 | DocBook 4 | Output Only |
docbook5 | DocBook 5 | Output Only |
docx | Word docx | |
dokuwiki | DokuWiki markup | Output Only |
dzslides | DZSlides HTML5 + JavaScript slide show | Output Only |
epub | EPUB | Input Only |
epub or epub3 | EPUB v3 book | Output Only |
epub2 | EPUB v2 | Output Only |
fb2 | FictionBook2 e-book | |
gfm | GitHub-Flavored Markdown | |
haddock | Haddock markup | |
html | HTML | |
html4 | XHTML 1.0 Transitional | Output Only |
icml | InDesign ICML | Output Only |
jats | JATS XML | |
json | JSON version of native AST | |
latex | LaTeX | |
man | groff man | Output Only |
markdown | Pandoc s Markdown | |
markdown_mmd | MultiMarkdown | |
markdown_phpextra | PHP Markdown Extra | |
markdown_strict | original unextended Markdown | |
mediawiki | MediaWiki markup | |
ms | groff ms | Output Only |
muse | Muse | |
native | native Haskell | |
odt | OpenOffice text document | |
opendocument | OpenDocument | Output Only |
opml | OPML | |
org | Emacs Org mode | |
plain | plain text | Output Only |
pptx | PowerPoint slide show | Output Only |
revealjs | reveal.js HTML5 + JavaScript slide show | Output Only |
rst | reStructuredText | |
rtf | Rich Text Format | Output Only |
s5 | S5 HTML and JavaScript slide show | Output Only |
slideous | Slideous HTML and JavaScript slide show | Output Only |
slidy | Slidy HTML and JavaScript slide show | Output Only |
t2t | txt2tags | Input Only |
tei | TEI Simple | Output Only |
texinfo | GNU Texinfo | Output Only |
textile | Textile | |
tikiwiki | TikiWiki markup | Input Only |
twiki | TWiki markup | Input Only |
vimwiki | Vimwiki | Input Only |
zimwiki | ZimWiki markup | Output Only |
A PDF can be specified by putting a .pdf
extension on the output file name.
Pandoc can accept a parameter to use a file as a template (defining page parameters, what typeface, size, etc. for "heading 1," etc.). This allows control of how the document should look.
The options for a PDF would be a LaTeX document.
To specify a template, use the --reference-doc
option. For instance, to create a PDF from a MarkDown document with options you would enter:
pandoc document.md -f markdown -o document.pdf --reference-doc=template.latex
The area to enter commands and messages has EMACS like key bindings to get around (C-a
, etc.). Special ones below...
Keystroke | Function |
---|---|
C-c b |
Set Bold Text |
C-c c |
Set Colored Text |
C-c i |
Set Italic Text |
C-c o |
Color Reset |
C-c v |
Reverse Color |
C-c _ |
Set Underline Text |
UP |
Previous Command/Message |
DOWN |
Next Command/Message |
Keystroke :Function | |
---|---|
ALT-Left |
Cycle Buffers One Way |
ALT-Right |
Cycle Buffers the Other Way |
PGUP |
Scroll Backwards in Buffer History |
PGDN |
Scroll Forwards in Buffer History |
C-l |
Redraw Window |
Commands are initiated with a forward-slash (/
) character in the command/message line. Some key ones:
Keystroke | Function |
---|---|
/away message |
Sets away message. Put -all for all servers. Remove with no message. |
/quit |
Quits WeeChat |
Example will be for Markdown to HTML. Works for any pandoc format that can use STDIN/STDOUT
M-1 M-|
(M-|
is shell-command-on-region
. The numerical argument (M-1
) will have the out put replace the region.pandoc -f markdown -t html
Assumes output to HTML.
M-|
pandoc -f markdown -t html -o filename.html
Be sure to use the right path separator (\
or /
) based on your operating system.
Example assumes output to Word, but do what works for you.
pandoc con -f markdown -t docx -o filenamex.docx
C-z
for end of file, then enter
.Also going to assume Word. Again, do what floats your boat.
cat|pandoc -f markdown -t docx -o filename.docx
C-d
.