From 24cadefafc504cffb5707ecbbd0af3437fb258ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=84min=20Baumeler?= Date: Thu, 19 Feb 2026 16:19:18 +0100 Subject: [PATCH] doc: denote link completion --- README.md | 19 +++++++++++++------ doc/denote.txt | 13 ++++++++----- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ee6e9a4..4516c67 100644 --- a/README.md +++ b/README.md @@ -32,15 +32,22 @@ the help files. This will allow you to get more help using `:help denote` or similar commands. ### Usage -For following links, simply move your cursor to the denote link, and press +For _following links,_ simply move your cursor to the denote link, and press `gf`. -Browsing and searching notes is implemented using the [location +This package also provides denote _link completion_ using the +[|'omnifunc'|](https://vimhelp.org/options.txt.html#%27omnifunc%27) option. So, +the link is completed after pressing `` while typing any prefix of a +denote link `denote:`. Even more so, if this completion is invoked +after typing `denote:`, then the link is completed for denote entries +that have `` as part of the title. + +_Browsing_ and _searching notes_ is implemented using the [location list](https://vimhelp.org/quickfix.txt.html#location-list). -So, after running any of the following commands, you may navigate your notes -using, e.g., `:lopen` to open the list, `:lnext` and `:lprev`, to move to the next or -previous entry (the list does not need to be opened for that), and `:lclose` -for closing the location list. +This means that you may navigate your notes using, e.g., `:lopen` to open the +list, `:lnext` and `:lprev`, to move to the next or previous entry (the list +does not need to be opened for that), and `:lclose` for closing the location +list. #### Commands This package defines the following user commands: diff --git a/doc/denote.txt b/doc/denote.txt index 54c9efb..bc8dd2c 100644 --- a/doc/denote.txt +++ b/doc/denote.txt @@ -21,7 +21,7 @@ do adjusting the tags or changing the title of a note. The official manual is available online: https://protesilaos.com/emacs/denote -The denote plugin adds denote-functionality to vim --- the vim way. We are +The denote plugin adds denote functionality to vim --- _the vim way._ We are aware of two other plugins, but we fear that these plugins are not flexible enough, and more importantly, do not follow the vim philosophy for handling denote notes. These mentioned plugins are available here: @@ -29,10 +29,13 @@ denote notes. These mentioned plugins are available here: https://git.sr.ht/~ashton314/vim-denote In contrast to these plugins, the present package relies on the -|location-list| features for displaying denote entries, and on and -|'includeexpr'| option for following the links (see, |gf|). This plugin also -provides custom location-list formatting using the option -|'quickfixtextfunc'|. +|location-list| features for displaying denote entries, and on the options +|'quickfixtextfunc'|, |'includeexpr'|, and |'omnifunc'|. With these, denote +links can be followed using |gf|, and completed using omni comletion (see, +|compl-omni|). For link completion, press |i_CTRL-X_CTRL-O| after typing any +prefix of a denote link. This completion also works with titles: by invoking +omni completion after typing "denote:foo", denote links are completed for +entries containing "foo" in the title. *denote-commands* Commands ~