Commit graph

8 commits

Author SHA1 Message Date
eaa7b589d2
Add anchor duplicate checking before creation 2021-05-04 20:23:07 +02:00
3eccd67b21
Fix option precedence buffer over global 2021-04-30 16:45:48 +02:00
fdcb0f2a93
Add opening zettel by reference if no anchor found
Opens zettel by linked value, most often a direct path link, but will
also look through the root dir to find a(n exactly) matching basename to
open.

If nothing is found in the root dir will open a new file to write with
the corresponding name. Careful, if the reference is a full path
definition, and the file does not exist, it will still open the
corresponding file at the correct location but when attempting to save
will generally complain if parts of the path are missing. They have to
be created manually or in some other place, this is outside the scope of
this plugin.
2021-04-30 16:30:52 +02:00
43673aaf35
Change zettel anchor getting function definition
Unify the definitions of the two function to take a set of files instead
of different arguments. The list of files has the form:
files = { "full/path/name.md" = "name.md" }

I.e. the complete path is the key and the file basename the value,
leading to a set of files, even if basenames are the same.

Usually it will be created by the get_all_files function of the same
module, but it can be passed in manually as well (e.g. to avoid
duplicate filesystem lookups, etc).
2021-04-30 16:19:07 +02:00
4aa9d98818
Add Zettel ref getting defaulting to root dir 2021-04-30 16:10:35 +02:00
e2a97570e0
Add zettel opening by base name matching 2021-04-30 16:02:13 +02:00
325be3c500
Split zettel getting into by anchor and by ref
Prepare for creating a lookup of zettels through the root directory by
file name as well as zettel id.
2021-04-30 15:52:54 +02:00
9dcd2556ba
Rename list module to files module
Renamed to 'files.lua' since it is the only module actively working on
the underlying filesystem so far -- gathering existing files and zettel
in the directories.
2021-04-30 15:30:43 +02:00
Renamed from lua/zettelkasten/list.lua (Browse further)