code: cleaned up
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
" This resolves denote links. The function has access to the variable v:fname,
|
||||
" which corresponds to the filename under the cursor.
|
||||
function s:gotofile()
|
||||
return v:fname !~ "^denote:"
|
||||
return v:fname !~ '^denote:'
|
||||
\ ? v:fname
|
||||
\ : denote#meta#fileFromNoteId(v:fname[7:]) ?? v:fname
|
||||
endfunction
|
||||
@@ -19,7 +19,7 @@ function denote#ft#denote()
|
||||
" Set the function to resolve the filename under the cursor (see |gf|).
|
||||
setlocal includeexpr=s:gotofile()
|
||||
" Back references command
|
||||
let l:noteid = denote#meta#noteIdFromFile(expand("%:t"))
|
||||
let l:noteid = denote#meta#noteIdFromFile(expand('%:t'))
|
||||
exe 'command! DenoteBackReferences DenoteGrep /\<denote:' .. l:noteid .. '\>/gj'
|
||||
endfunction
|
||||
|
||||
@@ -32,7 +32,6 @@ function denote#ft#qf()
|
||||
" Clear settings
|
||||
set spell<
|
||||
nmapclear <buffer>
|
||||
" nunmap <buffer> q
|
||||
return
|
||||
endif
|
||||
setlocal nospell
|
||||
|
||||
Reference in New Issue
Block a user