{"id":13395439,"url":"https://github.com/alok/notational-fzf-vim","last_synced_at":"2025-05-16T11:06:19.649Z","repository":{"id":16175684,"uuid":"79503548","full_name":"alok/notational-fzf-vim","owner":"alok","description":"Notational velocity for vim. ","archived":false,"fork":false,"pushed_at":"2023-01-11T17:12:06.000Z","size":2218,"stargazers_count":1120,"open_issues_count":19,"forks_count":63,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-12T08:17:18.628Z","etag":null,"topics":["deft","filter-string","fzf","neovim","notational-velocity","note-taking","notes","nvalt","plain-text","search","vim","vim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alok.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-19T22:56:15.000Z","updated_at":"2025-02-15T22:47:50.000Z","dependencies_parsed_at":"2023-01-13T18:44:04.344Z","dependency_job_id":null,"html_url":"https://github.com/alok/notational-fzf-vim","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alok%2Fnotational-fzf-vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alok%2Fnotational-fzf-vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alok%2Fnotational-fzf-vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alok%2Fnotational-fzf-vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alok","download_url":"https://codeload.github.com/alok/notational-fzf-vim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518383,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deft","filter-string","fzf","neovim","notational-velocity","note-taking","notes","nvalt","plain-text","search","vim","vim-plugin"],"created_at":"2024-07-30T17:01:58.722Z","updated_at":"2025-05-16T11:06:14.640Z","avatar_url":"https://github.com/alok.png","language":"Vim Script","funding_links":[],"categories":["Vim script","Vim Script"],"sub_categories":[],"readme":"# Looking for Maintainer\n\nI don't have time to maintain this project anymore. If you are interested in\ntaking over, please contact me in the GitHub issues.\n\n# Notational FZF\n\n***Loosen the mental blockages to recording information. Scrape away the\ntartar of convention that handicaps its retrieval.***\n\n--- [Notational Velocity home page](http://notational.net/)\n\nNotational Velocity is a note-taking app where searching for a note and\ncreating one are the same operation.\n\nYou search for a query, and if no note matches, it creates a new note\nwith that query as the title.\n\n## Usage\n\nSee the following GIF or watch this\n[asciinema](https://asciinema.org/a/oXAsE6lDnywkrSSH5xuOIVQuO):\n\n![Usage](/screenshots/usage.gif?raw=true \"Usage\")\n\n## Installation\n\n``` {.vim}\n\" with vim-plug\nPlug 'https://github.com/alok/notational-fzf-vim'\n```\n\n## Changes\n\nRead `CHANGELOG.md`.\n\n## Description\n\nVim is great for writing. But it isn't optimized for note-taking, where\nyou often create lots of little notes and frequently change larger notes\nin a separate directory from the one you're working in. For years I used\n[nvALT](http://brettterpstra.com/projects/nvalt/) and whenever I had to\ndo serious editing, I would open the file in Vim.\n\nBut some things about nvALT bugged me.\n\n-   It's not meant for large text files, and opening them will cause it\n    to lag *a lot*.\n\n-   I can't use splits\n\n-   I do most of my work in Vim, so why have another window open,\n    wasting precious screen space with its inferior editing\n    capabilities. Sorry Brett, but nvALT can't match Vim's editing\n    speed.\n\n-   I also disagree with some parts of Notational Velocity's philosophy.\n\nPlugins like [vim-pad](https://github.com/fmoralesc/vim-pad) didn't do\nit for me either, because:\n\n-   I don't want to archive my notes. I should be able to just search\n    for them.\n-   I don't want to use the first line as the title since I have notes\n    with duplicated titles in different directories, like `README.md`.\n-   I just want to be able to search a set of directories and create\n    notes in one of them, ***quickly***.\n\nWhen [Junegunn](https://github.com/junegunn/) created\n[`fzf`](https://github.com/junegunn/fzf), I realized that I could have\nall that, in Vim.\n\nThis plugin allows you to define a list of directories that you want to\nsearch. The first directory in the list is used as the main directory,\nunless you set `g:nv_main_directory`. If you press `control-x` after\ntyping some words, it will use those words as the filename to create a\nfile in the main directory. It will then open that file in a vertical\nsplit. If that file already exists, don't worry, it won't overwrite it.\nThis plugin never modifies your files at any point. It can only read,\nopen, and create them.\n\nYou can define relative links, so adding `./docs` and `./notes` will\nwork. Keep in mind that it's relative to your current working directory\n(as Vim interprets it).\n\n## Dependencies\n\n-   [`rg`](https://github.com/BurntSushi/ripgrep) is required for its\n    fast search.\n\n-   [`fzf`](https://github.com/junegunn/fzf).\n\n-   `fzf` Vim plugin. Install the Vim plugin that comes with `fzf`,\n    which can be done like so if you use\n    [vim-plug](https://github.com/junegunn/vim-plug).\n\n    ``` {.vim}\n    Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }\n    ```\n\n-   Python 3.5 or higher, for the preview window and filepath\n    shortening.\n\n## Optional dependencies\n\n-   Pypy 3, for a potential speedup\n\n## Required Settings\n\nYou have to define a list of directories **or** files (which all must be\nstrings) to search. This setting is named `g:nv_search_paths`.\n\nRemember that these can be relative links.\n\n``` {.vim}\n\" example\nlet g:nv_search_paths = ['~/wiki', '~/writing', '~/code', 'docs.md' , './notes.md']\n```\n\n## Detailed Usage\n\nThis plugin unites searching and file creation. It defines a single\ncommand `:NV`, which can take 0 or more arguments, which are interpreted\nas regexes.\n\nType `:NV` or bind it to a mapping to bring up a fuzzy search menu. Type\nin your search terms and it will fuzzy search for them. Adding an\nexclamation mark to the command (`:NV!`), will run it fullscreen.\n\nYou can type `:NV` to see all results, and then filter them with FZF.\nYou can type `:NV python` to restrict your initial search to lines that\ncontain the phrase `python`. `:NV [0-9] [0-9]` will find all numbers\nseparated by a space. You know, regexes.\n\nIt does not search in a fully fuzzy fashion because that's less useful\nfor prose. It looks for full words, but they don't have to be next to\neach other, just on the same line. You can use the arrow keys or `c-p`\nand `c-n` to scroll through the search results, and then hit one of\nthese keys to open up a file:\n\nNote that the following options can be customized.\n\n-   `c-x`: Use search string as filename and open in vertical split.\n-   `c-v`: Open in vertical split\n-   `c-s`: Open in horizontal split\n-   `c-t`: Open in new tab\n-   `c-y`: Yank the selected filenames\n-   `\u003cEnter\u003e`: Open highlighted search result in current buffer\n\nThe lines around the selected file will be visible in a preview window.\n\n## Mappings\n\nThis plugin only defines a command `:NV`, and if you want a mapping for\nit, you can define it yourself. This is intentionally not done by\ndefault. You should use whatever mapping(s) work best for you.\n\nFor example,\n\n``` {.vim}\nnnoremap \u003csilent\u003e \u003cc-s\u003e :NV\u003cCR\u003e\n```\n\n## Optional Settings and Their Defaults\n\nYou can display the full path by setting `g:nv_use_short_pathnames = 0`.\n\nYou can toggle displaying the preview window by pressing `alt-p`. This\nis handy on smaller screens. If you don't want to show the preview by\ndefault, set `g:nv_show_preview = 0`.\n\n``` {.vim}\n\" String. Set to '' (the empty string) if you don't want an extension appended by default.\n\" Don't forget the dot, unless you don't want one.\nlet g:nv_default_extension = '.md'\n\n\" String. Default is first directory found in `g:nv_search_paths`. Error thrown\n\"if no directory found and g:nv_main_directory is not specified\n\"let g:nv_main_directory = g:nv_main_directory or (first directory in g:nv_search_paths)\n\n\" Dictionary with string keys and values. Must be in the form 'ctrl-KEY':\n\" 'command' or 'alt-KEY' : 'command'. See examples below.\nlet g:nv_keymap = {\n                    \\ 'ctrl-s': 'split ',\n                    \\ 'ctrl-v': 'vertical split ',\n                    \\ 'ctrl-t': 'tabedit ',\n                    \\ })\n\n\" String. Must be in the form 'ctrl-KEY' or 'alt-KEY'\nlet g:nv_create_note_key = 'ctrl-x'\n\n\" String. Controls how new note window is created.\nlet g:nv_create_note_window = 'vertical split'\n\n\" Boolean. Show preview. Set by default. Pressing Alt-p in FZF will toggle this for the current search.\nlet g:nv_show_preview = 1\n\n\" Boolean. Respect .*ignore files in or above nv_search_paths. Set by default.\nlet g:nv_use_ignore_files = 1\n\n\" Boolean. Include hidden files and folders in search. Disabled by default.\nlet g:nv_include_hidden = 0\n\n\" Boolean. Wrap text in preview window.\nlet g:nv_wrap_preview_text = 1\n\n\" String. Width of window as a percentage of screen's width.\nlet g:nv_window_width = '40%'\n\n\" String. Determines where the window is. Valid options are: 'right', 'left', 'up', 'down'.\nlet g:nv_window_direction = 'down'\n\n\" String. Command to open the window (e.g. `vertical` `aboveleft` `30new` `call my_function()`).\nlet g:nv_window_command = 'call my_function()'\n\n\" Float. Width of preview window as a percentage of screen's width. 50% by default.\nlet g:nv_preview_width = 50\n\n\" String. Determines where the preview window is. Valid options are: 'right', 'left', 'up', 'down'.\nlet g:nv_preview_direction = 'right'\n\n\" String. Yanks the selected filenames to the default register.\nlet g:nv_yank_key = 'ctrl-y'\n\n\" String. Separator used between yanked filenames.\nlet g:nv_yank_separator = \"\\n\"\n\n\" Boolean. If set, will truncate each path element to a single character. If\n\" you have colons in your pathname, this will fail. Set by default.\nlet g:nv_use_short_pathnames = 1\n\n\"List of Strings. Shell glob patterns. Ignore all filenames that match any of\n\" the patterns.\nlet g:nv_ignore_pattern = ['summarize-*', 'misc*']\n\n\" List of Strings. Key mappings like above in case you want to define your own\n\" handler function. Most users won't want to set this to anything.\n\nlet g:nv_expect_keys = []\n```\n\n### bat config\n\nIf `bat` is in the PATH then it will be used. It will use `$BAT_THEME` if it's set.\n\nYou can also define your own handler function, in case you don't like\nhow this plugin handles input but like how it wraps everything else. It\n*must* be called `NV_note_handler`.\n\n## Potential Use Cases\n\n-   Add `~/notes` and `~/wiki` so your notes are only one key binding\n    away.\n-   Add relative links like `./notes`, `./doc`, etc. to\n    `g:nv_search_paths` so you can always see/update the documentation\n    of your current project and keep up-to-date personal notes.\n\n## Philosophy\n\nTo quote [scrod](https://github.com/scrod/nv/issues/22),\n\n\u003e The reasoning behind Notational Velocity's present lack of\n\u003e multi-database support is that storing notes in separate databases\n\u003e would 1) Require the same kinds of decisions that\n\u003e category/folder-based organizers force upon their users (e.g., \"Is\n\u003e this note going to be work-specific or home-specific?\"), and 2) Defeat\n\u003e the point of instantaneous searching by requiring, ultimately, the\n\u003e user to repeat each search for every database in use.\n\n-   By providing a default directory, we offer (one) fix to the first\n    issue.\n\n-   By searching the whole set of directories simultaneously, we handle\n    the second.\n\nIt also handles Notational Velocity's issue with multiple databases.\nUNIX does not allow repeated filenames in the same folder, but often the\nparent folder provides context, like in `workout/TODO.md` and\n`coding/TODO.md`.\n\nThis plug-in attempts to abstract the operation of note-taking over\n*all* the notes you take, with priority given to one main notes\ndirectory.\n\n## Caveat Emptor\n\n-   This plugin is just a wrapper over FZF that can view directories and\n    open/create files. That's all it's ever meant to be. Anything else\n    would be put into a separate plugin.\n\n## Feedback\n\nIs ***always*** welcome. If you have any ideas or issues, let me know\nand I'll try to address them. Not all will be implemented, but if they\nfit into the philosophy of this plugin or seem really useful, I'll do my\nbest.\n\n## License\n\nApache 2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falok%2Fnotational-fzf-vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falok%2Fnotational-fzf-vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falok%2Fnotational-fzf-vim/lists"}