https://github.com/naps62/zk
A simple zettelkasten setup using Vim, fzf and ripgrep
https://github.com/naps62/zk
Last synced: about 1 year ago
JSON representation
A simple zettelkasten setup using Vim, fzf and ripgrep
- Host: GitHub
- URL: https://github.com/naps62/zk
- Owner: naps62
- Created: 2020-07-17T22:21:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-26T11:46:20.000Z (over 5 years ago)
- Last Synced: 2025-04-19T12:14:10.103Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 63.5 KB
- Stars: 31
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zettelkasten
A simple Zettelkasten setup using Vim + FZF + Ripgrep

## What is a zettelkasten?
> The zettelkasten (German: "slip box") is a knowledge management and note-taking method used in research and study.
[Wikipedia](https://en.wikipedia.org/wiki/Zettelkasten)
The zettelkasten method consists of taking multiple individual notes, tagging and relating them together, in order to
build a private knowledge base.
## Why?
I was inspired by [this post](https://superorganizers.substack.com/p/how-to-build-a-learning-machine), and by how the
author built his own setup using Unix tools. I wanted a similar, but slightly different setup.
By the way, his work is also [on Github](https://github.com/sirupsen/zk)
## How?
### Philosophy
Each zettel (probably not a real world, but I'll use that to refer to each individual note) is a markdown file, named
with a timestamp and a title.
Zettels can have tags (e.g.: `#programming`, `#quote`, `#really-good-advice`), as well as sources (e.g.: `@tim-ferriss`,
`@mom`, `@myself`).
They're otherwise plain markdown files, write whatever you want, in whatever format you wish. Here's a sample:
```
# 2020-07-17-11-30-optimization.md
Premature optimization is the root of all evil
**I opted to use markdown italic syntax for personal comments**
#quote #programming
@donald-knuth
```
You can then navigate your knowledge base by searching for tags, sources, or just plain full-text search.
All of this is powered by:
- [Vim](https://www.vim.org) ([Neovim](https://neovim.io) works too)
- [Fzf](https://github.com/junegunn/fzf)
- [Ripgrep](https://github.com/BurntSushi/ripgrep)
)
More tooling may be added down the line, but for now this simple setup serves me well.
### Installation
1. Make sure you have the `fzf`, `rg` commands working on your shell, as well as
the [fzf.vim](https://github.com/junegunn/fzf.vim) Vim plugin.
2. Clone the repo to some place:
```sh
git clone git@github.com:naps62/zk $HOME/.zk
```
3. Add the `bin` directory to your path
```sh
# add this to your .bashrc / .zshrc / .whateverrc
export PATH="$HOME/.zk/bin:$PATH"
```
4. Setup the needed `$ZK_PATH` variable, pointing to where you want your knowledge base to be:
```sh
# add this to your .bashrc / .zshrc / .whateverrc
export ZK_PATH="$HOME/zettelkasten"
```
5. Start using it
```sh
# create a new zettel
$ zk new "An Awesome Quote"
# search by tags
$ zk tags
# search by sources
$ zk sources
# full-text search the entire zettelkasten
$ zk search
# get help
$ zk help
```
## Contributing
Feel free to do so.
Pull requests, issues, or even a [tweet](https://twitter.com/naps62) is welcome.