Tell me your editor can do that! Link to heading

Copy a reference to exactly this function with correct types, at exactly this commit, paste it anywhere - markdown, slack claude code and jump back to it instantly, even days later.

Why do I need this? Link to heading

I write down every new task in a brag document - idea introduced to me by Julia Evans.

Every position links to the new note in a tasks directory. At the beginning, it’s a simple link; over time, I refine the title to be more descriptive.

After I’m done with it, it’s massive - for larger tasks, it might become a directory with multiple notes inside. The note itself contains all the knowledge I’ve gathered about the task - links to relevant PRs, issues, design documents, and so on.

This format used to work well - until I’ve started to sleep less :P

Why linking to text sucks Link to heading

  1. A file path doesn’t point to meaning - only a file
  2. It’s not bound to time - the file will change
  3. Navigation is manual and slow - even with super fast fuzzy sessions switching

Sharing a reference to a place in the code Link to heading

I’ve worked out a couple of shortcuts to make this easier:

ShortcutModeDescriptionExample
<leader>cfnCopy relative path from project rootsrc/main.rs
<leader>cFnCopy absolute path/home/user/project/src/main.rs
<leader>ctnCopy filename onlymain.rs
<leader>chnCopy directory path/home/user/project/src
<leader>cgnCopy GitHub link as markdown[main.rs#L42](https://github.com/...)
<leader>cgvCopy GitHub link with line range[main.rs#L10-L20](https://github.com/...)
<leader>cmnCopy markdown reference (local)[fn main](file:///path/to/main.rs#L42)
<leader>cglnCopy markdown with GitHub link[fn main](https://github.com/...)
<leader>jnJump to link from clipboard-
gjnJump to link under cursor-

The heavy lifting is done by a small rust cli called jump. It generates stable, shareable references - and knows how to resolve them back to file paths.

jump on  main is 󰏗 v0.1.0 via  v1.91.1 via  impure (nix-shell-env) 
❯ jump copy-markdown --root . --file src/main.rs --line 11 --character 11
{
  "markdown": "[fn jump::main](file:///home/flakm/programming/flakm/jump/src/main.rs#L11)"
}
❯ jump copy-markdown --root . --file src/main.rs --line 11 --character 11 --github
{
  "markdown": "[fn jump::main](https://github.com/FlakM/jump/blob/1cb37f37c72ed98fd9c29507067417762a924d66/src/main.rs#L11)"
}
jump on  main is 󰏗 v0.1.0 via  v1.91.1 via  impure (nix-shell-env) 
❯ jump "[fn jump::main](https://github.com/FlakM/jump/blob/1cb37f37c72ed98fd9c29507067417762a924d66/src/main.rs#L11)"
{
  "status": "success",
  "session": "jump",
  "file": "/home/flakm/programming/flakm/jump/src/main.rs",
  "line": 11
}

Findings Link to heading

Final thoughts Link to heading

I will not be touching tools that do not allow extensibility like this.

Being a power user, to me, means shaping your tools instead of adapting to their limits.

Let me know if you have any questions or suggestions - I’m always happy to discuss tooling and workflows!