• Stars
    star
    136
  • Rank 267,027 (Top 6 %)
  • Language
    TypeScript
  • Created over 3 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Makes creating footnotes in Obsidian more fun!

Obsidian Footnotes Plugin

This hotkey lets you:

  • Insert a new footnote marker (e.g. [^1]) with auto-incremented index in your text
    • Adds the footnote detail (e.g. [^1]: ) at the bottom of your text
    • Places your cursor so you can fill in the details quickly
  • Jump from your footnote TO the footnote detail
  • Jump from your footnote detail BACK to the footnote

Overview

IMPORTANT: You must to set up your footnote hotkey

After installing and activating this plugin, you still have to SET UP your hotkey. This is easy and quick:

Settings -> Hotkeys -> Search for "Footnote" -> Customize Command -> Your preferred hotkey

I personally use Command+Shift+6 because "6" on a US keyboard is where the uptick/footnote character "^" is.

Hotkey

Default Feature Details

Scenario: No previous numeric (e.g. "[^1]") footnotes exist:

  • Given my cursor is where I want a footnote to exist (e.g. Foo bar baz▊)
  • When I hit my footnote hotkey
  • Then a new footnote marker (e.g. [^1]) is inserted where my cursor was (e.g. Foo bar baz[^1])
  • And a new footnote details marker (e.g. [^1]: ) is inserted on the last line of the document
  • And my cursor is now placed at the end of the detail marker (e.g. [^1]: ▊)

Scenario: Previous numeric (e.g. "[^1]") footnotes exist:

  • Given there is one or more numeric footnotes in my text
  • And my cursor is where I want a footnote to exist (e.g. Foo bar[^1] baz▊)
  • When I hit my footnote hotkey
  • Then a new footnote marker with the next numeric index (e.g. [^2]) is inserted where my cursor was (e.g. Foo bar[^1] baz[^2])
  • And a new footnote details marker (e.g. [^2]: ) is inserted on the last line of the document
  • And my cursor is now placed at the end of the detail marker (e.g. [^2]: ▊)

Scenario: Jumping TO a footnote detail

  • Given I'm on a footnote detail line (e.g. [^1]: ▊)
  • When I hit my footnote hotkey
  • Then my cursor is placed right after the first occurence of this footnote in my text (e.g. [^1]▊)

Scenario: Jumping BACK to a footnote

  • Given I'm on - or next to - a footnote (e.g. [^1]▊) in my text
  • When I hit my footnote hotkey
  • Then my cursor is placed to the right of the footnote (e.g. [^1]: ▊)

Known Limitations or Untested Scenarios

Indices are not updated

Inserting new footnote in-between two existing footnotes will insert the next numeric index (e.g. 1, 3, 2).

It will NOT update the indices according to their natural order (e.g. 1, 2, 3).

Example sentence[^1] with two▊ footnotes[^2] already.
  
[^1]: Foo
[^2]: Bar

After insertion:

Example sentence[^1] with two[^3] footnotes[^2] already.
  
[^1]: Foo
[^2]: Bar
[^3]: Baz

See "Automatically Re-Index Footnotes" below for a proposed feature

Future Possible Feature Ideas

Automatically Re-Index Footnotes

Re-index and re-sort all footnotes when you insert a new one in-between one or more existing numbered footnotes:

Example sentence[^1] with two▊ footnotes[^2] already.
  
[^1]: Foo
[^2]: Bar

Base Scenario

  • Given there are two footnotes already
  • When I enter a new footnote in-between those two
  • Then the NEW footnote gets the index "2"
  • And the previously second footnote gets the index "3"
  • And the NEW footnote detail is inserted as the second entry at the bottom
  • And the previously second footnote detail at the bottom is updated to be "3"
  • And the previously second footnote detail at the bottom is updated to be in third position
Example sentence[^1] with two[^2] footnotes[^3] already.

[^1]: Foo
[^2]: Baz
[^3]: Bar▊

Edge Cases to consider ("What if...?")

What if... new footnote is inserted before the first footnote?
Some sentence▊ with existing note[^1]

[^1]: Details
What if... text has the same footnote at several places?
Some sentence with existing note[^1] and the same▊ footnote re-appears later[^1].


[^1]: Details
What if...Footnote details are spread across the text?
Some sentence with existing note[^1] some more text▊ 

[^1]: Inline footnote details

Another text part▊
What if... the footnote details are multi-line on the bottom?
Some sentence with existing note[^1] some more text▊ 

[^1]: The details that
Span across
Multiple lines
What if... there are non-numeric footnotes in the text?
Some sentence with existing note[^] some more text▊ 

[^]: Details

Background

This plugin is based on the great idea by jacob.4ristotle posted in the "Footnote Shortcut" thread.

Use case or problem:

I use Obsidian to take school notes, write essays and so on, and I find myself needing to add frequent footnotes. Currently, to add a new footnote, I need to:

  • scroll to the bottom to check how many footnotes I already have
  • type [^n] in the body of the note, where n is the next number
  • move to the end of the note, type [^n] again, and then add my citation.

Proposed solution:

It would be convenient to have a shortcut to automate these steps. In particular, I envision that the shortcut would: Using the smallest natural number n that has not yet been used for a footnote

  • add [^n] at the insertion point
  • add [^n]: to the end of the note, and move the insertion point there.

More Repositories

1

obsidian-extract-pdf

Extract PDFs to Markdown within Obsidian
JavaScript
230
star
2

obsidian-extract-pdf-highlights

Extract highlights, underlines and annotations from your PDFs into Obsidian
TypeScript
220
star
3

obsidian-journey-plugin

Discover the story between your notes in Obsidian
TypeScript
146
star
4

extract-highlights-plugin

Manage your highlights in Obsidian by easily creating, removing and exporting them.
TypeScript
88
star
5

dangerzone-writing-plugin

A plugin that forces you to write for X seconds. If you pause for more than 5 seconds, everything you've written in this note is DELETED.
TypeScript
69
star
6

quickdown

QuickDown – A better inbox for your ideas
Swift
63
star
7

obsidian-shuffle

Create custom and randomized writing prompts
TypeScript
47
star
8

Streamline

Streamline is a stream-of-consciousness writer for Obsidian
Swift
25
star
9

getunblah

An app for those (like myself) who talk too much, or too little, when they get nervous in meetings
SCSS
22
star
10

algorand-ballet

A qualitative analysis tool for the Algorand blockchain
Vue
15
star
11

plotto-for-obsidian

Write your plots faster with this 'batteries-included' collection of Plotto plain text markdown files for Obsidian.md
HTML
14
star
12

text-expander-plugin

A bare-bones and opinionated proof-of-concept text expander utility for Obsidian
TypeScript
13
star
13

getstreamline

Streamline is a stream-of-consciousness writer for Obsidian
HTML
11
star
14

getquickdown

QuickDown – A better inbox for your ideas.
SCSS
8
star
15

obsidian-recursor

An ambient plugin that will place your cursor back to where you left off.
TypeScript
8
star
16

getjamgpt

A free, instant & bespoke ChatGPT app for macOS
HTML
6
star
17

menu-bar-breathing

A small MacOS menu bar app that helps you breathe
Swift
5
star
18

obsidian-airgap

This plugin allows you to link to notes in an airgapped vault. This is useful if you want to link to ideas from one vault while working in a different one without the danger of mixing up the two.
TypeScript
5
star
19

Poppy

Poppy keeps your single most important webpage on top of all other windows. Very useful while writing with ChatGPT or pair programming on a backlog ticket.
Swift
5
star
20

pudding

Follow the Money, Find the Story. Have more fun with OSINT analysis and reconnaissance in decentralized finance ecosystems.
TypeScript
3
star
21

extracthighlights-dist

Custom PDFJS library for highlights
JavaScript
2
star
22

the-little-clojurian

My TDD implementation of "The Little Schemer" in Clojure.
Clojure
2
star
23

blockchain-toy

A recursive toy algorithm to calculate the nonce for zero-padded SHA256 hashes
Clojure
2
star
24

getpogo

Unlock the Power of GPT3 and OpenAI with a Single Keyboard Shortcut
1
star
25

LangChainInABox

A native macOS app for playing with LangChain that ships with a self-contained, embedded, Apple-notarisable Python 3.11 and up-to-date LangChain libraries
Python
1
star
26

KeyPair

KeyPair makes using keyboard shortcuts during pair programming sessions easier.
Swift
1
star
27

obsidian-dashboard

Dashboard for Obsidian
TypeScript
1
star