GithubHelp home page GithubHelp logo

magnushhoie / fuzzynotes Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 598 KB

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

License: MIT License

Shell 89.00% Python 11.00%
bash notes-app code-snippets search quickreference grep vim

fuzzynotes's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.