Initial commit

This commit is contained in:
2026-02-17 16:18:18 +01:00
commit 4e06bec5ef
6 changed files with 215 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
" Go to file command |gf| adjustments {{{1
" This resolves denote links in markdown and org files. The function has access
" to the variable v:fname, which corresponds to the filename under the cursor.
function s:DenoteGotoFile()
return v:fname !~ "^denote:"
\ ? v:fname
\ : denote#meta#fileFromNoteId(v:fname[7:]) ?? v:fname
endfunction
" Denote links are of the form 'denote:<note id>'; we require the column.
setlocal isfname+=:
" Set the function to resolve the filename under the cursor (see |gf|).
setlocal includeexpr=s:DenoteGotoFile()
" Back references command {{{1
command! DenoteBackReferences :call denote#loclist#references(denote#meta#noteIdFromFile(expand("%")))