From 00af1c53b9ed2d51acb3b77729a66e053039ca95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=84min=20Baumeler?= Date: Wed, 18 Feb 2026 17:24:20 +0100 Subject: [PATCH] documentation: new notes --- README.md | 14 +++++++------- doc/denote.txt | 28 +++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4371121..ee6e9a4 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,9 @@ search for patterns within your notes. With this, you may populate the location list with all links to the currently opened note. +- `:DenoteNew {title}`: +With this, a new note entry is generated with the supplied title. + #### Key mappings This package also defines the following interface for key mappings, which automatically open the location window: @@ -83,16 +86,13 @@ nnoremap [l :lprevious ``` ### Customization -You can customize the behavior of this package using the following two global -variables. The variable `g:denote_note_file_extensions` defaults to `['md', -'org', 'txt']` and lists the file extensions in which `:DenoteGrep` will look -for the given pattern. The other variable `g:denote_loc_title_columns` defaults -to `40` and specifies the number of columns used to display the titles of your -notes. +You can customize the behavior of this package using several global variables. +Customization is explained in the [help file](doc/denote.txt), also accessible +through `:help denote-settings`. ### Future features These features are planned: -- Note creation (and deletion?) - Tag manipulation - Title manipulation - Signature handling? +- Note deletion? diff --git a/doc/denote.txt b/doc/denote.txt index 2f1fa43..54c9efb 100644 --- a/doc/denote.txt +++ b/doc/denote.txt @@ -1,4 +1,4 @@ -*denote.txt* For Vim version 9.0. Last change: 2026 Feb 17 +*denote.txt* For Vim version 9.0. Last change: 2026 Feb 18 This is the documentation for the denote plugin. @@ -51,25 +51,47 @@ This command is a wrapper around |:lvimgrep| to search for a pattern in the denote entries. The required argument is a pattern as required by |:vimgrep|, i.e., /{pattern}/[g][j][f]. + *:DenoteNew* +This command takes as argument a note title, and generates a new denote entry +with the specified title. The entry file type is controlled by the setting +|g:denote_new_ft|. + *:DenoteBackReferences* When called from an opened denote entry, this command populates the location list with all references to the current note. *denote-settings* Settings ~ - *'g:denote_note_file_extension'* + *g:denote_note_file_extension* With this setting you may specify the file extensions of all denote entries within which |:DenoteGrep| will search for the provided pattern. If left unspecified, it is set to the following default value: > g:denote_note_file_extension = ['md', 'org', 'txt'] < - *'g:denote_loc_title_columns'* + *g:denote_loc_title_columns* This integer specifies the number of columns used to display the titles of denote entries. Per default, it is set to: > g:denote_loc_title_columns = 60 < + *g:denote_new_ft* +Newly created notes are of this file type. Possible values are 'md', 'org', or +'txt', with the following default: +> + g:denote_new_ft = 'md' +< + *g:denote_fm_md_type* +The front matter of 'md' notes is given as 'yaml' or as 'toml'. By default, +this package uses 'yaml': +> + g:denote_fm_md_type = 'yaml' +< + *g:denote_identifier_fun* +Denote allows the use of custom identifiers. This variable, if set, points to +a function that generates identifiers for newly created notes. The function is +supposed to return a unique string. + *denote-mappings* Mappings ~