Skip to content

Kakoune integration for emanote, the note-taking utility.

License

Notifications You must be signed in to change notification settings

MilanVasko/emanote-kak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

emanote-kak

This repository contains useful commands for interacting with an emanote repository.

Requirements

The following utilities are used, so make sure you have them installed and in PATH:

  • date
  • rg (support for other similar tools currently not planned, but PRs are welcome)
  • sed
  • wc
  • Any dmenu-like utility (I recommend rofi or bemenu, which I'm currently using). It needs to be able to do the following:
    • take input from stdin
    • print the selected option to stdout
    • print nothing if the selection was aborted

Note that there's no dependency on the emanote binary itself, so you can use this plugin in other contexts as well (say, neuron or any other kind of directory with Markdown files). Just note that supporting emanote will be a priority for possible further development.

Installing and configuring

The recommended approach is to use plug.kak for installing this plugin.

The snippet below shows how to install the plugin and also contains the recommended configuration (AKA how I personally use it).

plug "MilanVasko/emanote-kak" config %{
	# the following is a recommended configuration

	declare-user-mode emanote
	# you need to specify a menu program to filter the notes
	set-option global emanote_popup_selector_program "bemenu"
	map global emanote n -docstring "create new note with random ID"   ": emanote-new<ret>"
	map global emanote N -docstring "create new note"                  ": emanote-new "
	map global emanote s -docstring "search titles and open note"      ": emanote-search-and-open<ret>"
	map global emanote S -docstring "search all and open note"         ": emanote-search-all-and-open<ret>"
	map global emanote i -docstring "search titles and insert note ID" ": emanote-search-and-insert [[ ]]<ret>"
	map global emanote I -docstring "search all and insert note ID"    ": emanote-search-all-and-insert [[ ]]<ret>"
	map global emanote g -docstring "follow the link"                  ": emanote-follow-link<ret>"
}

Functionality

The following commands are provided:

  • emanote-new - creates a new note
  • emanote-search-and-open and emanote-search-all-and-open - searches for notes interactively
  • emanote-search-and-insert and emanote-search-all-and-insert - inserts the note ID of found note into the document
  • emanote-follow-link - follows the link under main selection

More commands may come in the future if I get ideas for new ones - all of the existing ones have their origins in my personal need. For now, these should be enough to make the most common tasks easier.

Contributing

If you'd like to contribute, please do! There are no hard rules to follow, just create an issue or a pull request and I'll try to get back to you.

About

Kakoune integration for emanote, the note-taking utility.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published