Skip to content

obsidian cheatsheet

This cheatsheet is me starting to learn to use Obsidian notes. So here we go.

ctrl+p = open command palette

Search in command palette: * Save –> Save current file: saves current file immediately. Files will save automatically after a few secs, but still. * Source –> Toggle Live preview/Source mode: handy because WYSIWYG is not always what you want to get.

installed community plugins

I have these community plugins installed in Obsidian via Settings -> Community Plugins

wrangler TODOS

  • ** wrangle todo** from command palette
  • wrangles all lines starting with “TODO” in your notes and consolidates them under a unified “TODOs” section.
  • Note: todos tagged - [ ] TODO will be moved to the end of each note in a newly created TODOs section.
  • https://github.com/jeel-shah/todo-wrangler

paste image rename

  • paste an image to any document and the rename prompt will display
  • https://github.com/reorx/obsidian-paste-image-rename
  • On iOS: Settings –> handle all attachments.

image converter

  • Use this instead of paste image rename plugin.
  • paste an image to any document: automatically convert to jpg and compress
  • auto-rename to predefined naming convention. Unfortunately you can’t set your own naming convention.

hard break

Hard line breaks in Markup are done by 2 whitespaces or a slash. Obsidian is lazy and in editor mode it doesn’t care about that. So running this plugin over a page will convert all “soft breaks” into 2 whitespaces, i.e. a hard break. Easy.

configuration

What works for me are the following settings: - Settings -> Editor -> Default view for new tabs: Reading view - Settings -> Editor -> Default editing mode: live preview - Settings -> Editor -> Strict line breaks: enabled - Setting -> Editor -> Indent using tabs: disabled - Settings -> Files & links -> Default location for new attachments - In subfolder under current folder - subfolder name: assets - Settings -> Files & links -> Default location for new notes: Same folder as current file - community plugins - paste image rename - handle all attachments ON - Community plugins - paste image rename - image name pattern- {{DATE:YYYY-MM-DD}}- - Settings -> Files & links -> wiki links: disabled - Settings -> Files & links -> new link format: relative path to file

My files are stored in iCloud and synced across devices. Storagefolder is icloud Drive\obsidian\
To stay organised I think I will create a folder for every Fabacademy week. And commit that folder to a branch which I intend to create for every week.

hosted live sync

A major part is synchronizing my notes between devices, specifically between iOS iphone and Windows laptop. To do this I installed the plugin obsidian self-hosted livesync.
This needs quite some configuration as I’m syncing my note to a Synology NAS that we have in the Fablab. An installation of couchDB is required. see here for steps how to do that. Some specific settings in docker-compose.yml will need to be made, which are described here. CouchDB runs in a docker on the NAS, which I maintain using portainer. This also requires reverse proxy. Next is to set things up in the app, which is described here.

custom CSS to make images look smaller

following this thread I could come up with a way to make images appear smaller. Markdown doesn’t allow image width and height to be set. But you can set an alt property. So with custom CSS stylesheets in both Obsidian as well as in mkdocs, a single alt=sm will make my image shrink to 30%. Nice.
Custom CSS in Obsidian from the help:

To add a CSS snippet, follow these steps:

1. Open **Settings**.
2. Under **Appearance → CSS snippets**, select **Open snippets folder** (folder icon).
3. In the snippets folder, create a CSS file that contains your snippet.
4. In Obsidian, under **Appearance → CSS snippets**, select **Reload snippets** (refresh icon) to see the snippet in the list.

Obsidian detects changes to CSS snippets automatically and applies them when you save your snippet. You don't need to restart Obsidian for changes to take effect.

my obsidian css:

img[alt="sm"] {
  width: max(300px,30%);
  max-height:auto;
}

And in mkdocs extra.css stylesheet:

img[alt="sm"] { /* add option to show smaller images by defining in markdown: ![sm](image.jpg) */
    width: max(300px,30%);
    max-height:auto;
  }
}