Obsidian Cheat Sheet
By Andreas Røssland
Correct indentation when pasting code
When pasting code into Obsidian, remember to use Ctrl Shift V (Windows) to paste as plaintext.
Ctrl V: (Notice the for-line’s indentation is wrong)
func part12(in Input) {
lastWin := -1
for _, draw := range in.Nums {
for k := range in.Boards {
Ctrl Shift V:
func part12(in Input) {
lastWin := -1
for _, draw := range in.Nums {
for k := range in.Boards {
Inline Mermaid graphs
Mermaid is great for plotting graphs, sequence diagrams, pie charts, flowcharts.
graph LR;
A-->B-->D;
A-->C---->D;
```mermaid
graph LR;
A-->B-->D;
A-->C---->D;
```
Verbatim code blocks
Just add another backtick to your code fence, and triple backticks will show up verbatim instead of as a code block. The source code for this document uses a whopping five backticks to display this code block.
````markdown
```mermaid
graph LR;
A-->B-->D;
A-->C---->D;
```
````
Hotkeys
- Switch between Markdown view and preview view
- Ctrl E — Cmd E
- Check/uncheck checkbox
- Ctrl Enter — Cmd Enter
- Quick switch to note using search
- Ctrl O — Cmd O
- Global free text search
- Ctrl Shift F — Cmd Shift F
- Navigate back and forwards
- Alt Left/Right — Opt Left/Right
- Add Markdown link
- Ctrl K — Cmd K
- Start editing entire title
- F2
- Fullscreen and back
- F11
- Open Options
- Ctrl ,