nvim: Fix zettelkasten links
Fixed links in zk which do not follow the exact pattern of anchor space title, allowing for wiki-style links and so on.
This commit is contained in:
parent
1311c30e84
commit
28f7f304c1
2 changed files with 8 additions and 2 deletions
|
@ -40,7 +40,7 @@ endfunction
|
||||||
let g:wiki_map_link_create = 'ZettelLinkCreate'
|
let g:wiki_map_link_create = 'ZettelLinkCreate'
|
||||||
|
|
||||||
let g:zettel_anchor_separator = ' '
|
let g:zettel_anchor_separator = ' '
|
||||||
let g:zettel_anchor_pattern = '[:/]\d\{10,14} '
|
let g:zettel_anchor_pattern = '[:/]\d\{10,14}'
|
||||||
" Returns the full path to the Zettel owning the anchor id passed in
|
" Returns the full path to the Zettel owning the anchor id passed in
|
||||||
function! s:GetZettelPath(anchor) abort
|
function! s:GetZettelPath(anchor) abort
|
||||||
" match first 10-digit-beggining file ending with .md
|
" match first 10-digit-beggining file ending with .md
|
||||||
|
@ -58,7 +58,6 @@ function! s:GetZettelPath(anchor) abort
|
||||||
endfunction
|
endfunction
|
||||||
command! -nargs=1 ZettelOpen execute ":e " . s:GetZettelPath(<q-args>)
|
command! -nargs=1 ZettelOpen execute ":e " . s:GetZettelPath(<q-args>)
|
||||||
|
|
||||||
|
|
||||||
" Uses the Zettel Anchor ID instead of the whole link structure to traverse
|
" Uses the Zettel Anchor ID instead of the whole link structure to traverse
|
||||||
" the whole Wiki directory from its root and opens first fitting Zettel
|
" the whole Wiki directory from its root and opens first fitting Zettel
|
||||||
function! ZettelOpenAtCursor(...) abort
|
function! ZettelOpenAtCursor(...) abort
|
||||||
|
|
|
@ -60,3 +60,10 @@ presidentialization
|
||||||
Polanyi
|
Polanyi
|
||||||
iconicity
|
iconicity
|
||||||
Gramsci's
|
Gramsci's
|
||||||
|
feminization
|
||||||
|
tertiarization
|
||||||
|
impactful
|
||||||
|
glyphosate
|
||||||
|
Monstanto
|
||||||
|
univseralism
|
||||||
|
universalisms
|
||||||
|
|
Loading…
Reference in a new issue