Skip to content

Blazingly fast search and editing of note files in your terminal. Built with FZF.

License

Notifications You must be signed in to change notification settings

Magnushhoie/FuzzyNotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


FuzzyNotes (outdated, please see Fuz)

Ultra-fast, terminal based note searching and editing app powered by FZF and vim. Click to watch tutorial:

Logo

What is FuzzyNotes?

FuzzyNotes interactively searches and returns text search results from a nested folder of text files. Files are previewed or opened at exact match for copying or editing. FuzzyNotes solves the problem of being unable to access text you forgot where you wrote. With FuzzyNotes, any written text will always be found, assuming its there.

Usage

  • fz: Interactively and recursively searches across all text files in ~/_FuzzyNotes/ directory. Opens file with less for easy copy-paste or scrolling
  • fze: Lists all files with search match and previews matched text. Opens file in editor.

See notes.txt for example note file.

Typical use-cases are for project notes or log-books, code-snippets, or on top of knowledge management software like Obsidian or Roam. FuzzyNotes works with any nested collection of text files.

Features:

  • Interactive search with FZF, partial search matches
  • Preview matches in side-bar
  • Code highlighting
  • fze always opens file at last edited location
  • Assumes first keyword is either a file, or keywords (e.g. fz python hello world will either search python.txt or across all files)

Installation

Sets up notes directory and adds aliases to ~/.bash_profile or ~/.zshrc.

# Requirements
brew install fzf
brew install bat

# Install
git clone https://github.com/Magnushhoie/FuzzyNotes/
cd FuzzyNotes
bash setup.sh

Documentation

Use "fz --help" for all arguments.

fz - "Fuzzy" search and view

usage: fz [file] keywords
  keywords: Search terms, space-separated
  file: Optional, filename (without extension) in note folder

Example usage:
# Interactively search / preview / open files for selected lines starting with __ or #:
fz

# Search across all files for "list"
fz list
  
# Search across all lines (not just starting with __ or #)
fz -f

# Search python.py in note folder for "list" "comprehension"
fz python list comprehension

fze - "Fuzzy" edit

usage: fze [file] keywords
  keywords: Search terms, space-separated
  file: Optional, filename (without extension) in note folder

Example usage:
# Interactively select file in _FuzzyNotes
fze

# Open last modified file at last edited location by pressing Enter twice
fze <enter> <enter>

# Search file python.py (no extension) for keywords "for" and "loop". Opens match in vim.
fze python for loop
  
# Open _FuzzyNotes folder
fze --open
  
# Open file in system editor
fze --open notes.txt

# Add new file, named new_note.txt
fze -n new_note.txt

Testing

bash test/test.sh

Compatibility

Compatible with zsh. Tested on MacOS Mojave/Big Sur and Ubuntu 21.04.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Blazingly fast search and editing of note files in your terminal. Built with FZF.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published