Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix error messenge on file type other than markdown #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions autoload/zettel.vim
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function s:GetTagFieldHeaders(default_overrides) abort
" arbitary field, values in the header but
" they are uppercased.
"
" default_overrides :
" default_overrides :
" - dictionary to override the tag field defaults
" - example : { 'togit' : 0 }
let l:tag_field_headers = []
Expand All @@ -119,7 +119,7 @@ endfunction
function s:GetTagFilePath(stub_path_to_tagfile)
" stub_path_to_tagfile
" - just the suffix, example : 'folder0/folder1/tagfile'
"
"
" Return
" l:abs_path_to_tagfile
" - abs path to the tagfile, example: '/Users/blah/.zettel/folder0/folder1/tagfile'
Expand Down Expand Up @@ -727,8 +727,10 @@ endfunction
function s:IntializeAutoupdate() abort
augroup zettel_autoupdate_tags
" default fzf is vsplit, tab split, split, e
autocmd BufEnter * call zettel#autoupdate#loadMarkerDicts()
autocmd BufLeave,BufUnload * call zettel#autoupdate#updateFiles()
" may fix error message with other file type than markdown
autocmd!
autocmd BufEnter *.md call zettel#autoupdate#loadMarkerDicts()
autocmd BufLeave,BufUnload *.md call zettel#autoupdate#updateFiles()
augroup END
endfunction

Expand Down Expand Up @@ -776,7 +778,7 @@ function! zettel#listTags(in_this_file, ...) abort
let l:filters = {"filepath": expand("%:p")}
endif
let l:filters["tagfile"] = a:000

let l:tag_lines = zettel#utils#getAllTagLines(l:filters)
let l:source = map(copy(l:tag_lines), "s:MapGetSourceLine(v:val)")
let l:Sink = function("s:HandleTagJump", [l:tag_lines])
Expand Down
106 changes: 0 additions & 106 deletions plugin/zettel.vim

This file was deleted.