Commit graph

29 commits

Author SHA1 Message Date
bd2481d41e
Rename index opening function
Renamed function to fit in line with other exposed lua API, putting
object before action, i.e. zettel_index_open instead of open_index.
2021-10-20 16:38:58 +02:00
fc54052d2c
Update README
Improve descriptions for accesible API and reword some examples.
2021-10-20 16:38:10 +02:00
46df48be3f
Update README
Updated some examples, wordings and ideas.
2021-07-26 22:30:11 +02:00
aad77cff07
Add function to open root index file
Call up `require 'zettelkasten'.open_index()` to open the file.
Pass along a file name `require 'zettelkasten'.open_index('home')` to
open said file at the zettel root instead.
2021-07-26 22:30:11 +02:00
98eeaf6fc7
Update README
Add some simple usage instructions.
2021-05-20 15:06:57 +02:00
20d8edb800
Update README 2021-05-20 14:13:09 +02:00
5345b6c345
Add tests to text module 2021-05-04 17:13:48 +02:00
477ec45d22
Add follow link command to go to or create link
Automatically chooses whether to create a new link or go to an existing
file, depending on the existence of a link in the current context (i.e.
under the cursor or in selection).
2021-05-04 14:06:59 +02:00
1a58909e94
Rename create_link to make_link
Should prepare the differentiation between a 'new' link and linking an
existing zetttel -- one is 'new_link' and one just 'makes_link' to
something else.
2021-05-04 09:46:18 +02:00
7c6882ac16
Rename imports and local vars to unify more 2021-05-03 17:29:42 +02:00
3f3e5ec7c2
Remove bignumber allocation, refactor open function
Switched out manual BIGNUMBER creation for the lua inbuilt `math.huge`.
Refactored `open_selected` a tiny bit in preparation for automatic link
creation.
2021-04-30 17:32:03 +02:00
f615dd0fbd
Update readme 2021-04-30 16:46:03 +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
4aa9d98818
Add Zettel ref getting defaulting to root dir 2021-04-30 16:10:35 +02:00
e31630a8c4
Fix function formatting getting zettel from dir 2021-04-30 15:26:32 +02:00
5228a3b49e
Refactor file listing and zettel picking 2021-04-30 15:09:07 +02:00
94ff554d8d
Update readme and debug mappings 2021-04-30 13:28:39 +02:00
162057f149
Add configurable zettel root directory
Plugin will by default recursively look in this directory for any
zettel.
2020-11-06 16:44:55 +01:00
101a15c8c9
Refactor link options into their own category 2020-11-06 16:01:51 +01:00
44a985cce6
Add anchor extraction function
`anchor.extract(string, anchor)` will find and extract a zettel anchor
from any string passed in.

It can be given an optional anchor regex which will supersede any regex
set in the plugin options.
2020-11-06 15:53:01 +01:00
d29d92cc0a
Remove hardcoded options, do repo house-cleaning
Update readme and tmux.session file.

Remove unused tests, update option calling.
2020-11-04 22:27:30 +01:00
ba033e2b24
Add function to search for next link on line
By choosing 'line' in the `zettel_link_following` option, the link to be
opened will be searched for on the complete rest of the line, meaning
from the cursor to the newline symbol onwards.
2020-11-02 21:51:14 +01:00
59574a17e9
Add zettel link following style option
`g:zettel_link_following` can be set to `cursor` or `line` to change the
way zk detect the closest link to follow to (or create a new link for).

Setting it to `cursor` will look for the current word under the cursor and
decide if it is a followable link. `line` will look from the current
cursor position to the end of the line instead.
2020-11-01 22:18:40 +01:00
320007e14b
Move anchor prepend function to anchor module 2020-10-31 11:05:30 +01:00
aa3e1eb754
Refactor link cleaning and transformation functions 2020-10-30 18:21:04 +01:00
cac9720d35
Refactor anchor and link functions into files 2020-10-30 16:30:37 +01:00
a365cef6c7
Move intended features to README 2020-10-29 18:41:05 +01:00
c7236ad295
Add Datestamp and Link creation functionality 2020-10-26 19:32:27 +01:00
86ab71b1d6
Initial commit 2020-10-26 15:55:40 +01:00