From b595688a65c0af506a125cc793b1935054acc0bd Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Thu, 4 May 2023 23:09:27 +1000 Subject: [PATCH] task-note matches correct template, %link is highlighted on vimwiki filetypes --- home/profiles/nvim/default.nix | 2 ++ home/profiles/task/bin/task-note.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/home/profiles/nvim/default.nix b/home/profiles/nvim/default.nix index 7f359d1c..c5c41d70 100644 --- a/home/profiles/nvim/default.nix +++ b/home/profiles/nvim/default.nix @@ -151,6 +151,8 @@ in home.file.".config/nvim/after/syntax/vimwiki.vim".text = '' " match with %update syntax match VimwikiPlaceholder /^\s*%update\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite + " match with %link + syntax match VimwikiPlaceholder /^\s*%link\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite ''; #environment.systemPackages = with customPlugins; [ tidal ]; diff --git a/home/profiles/task/bin/task-note.py b/home/profiles/task/bin/task-note.py index a8fa3019..2c7581ce 100755 --- a/home/profiles/task/bin/task-note.py +++ b/home/profiles/task/bin/task-note.py @@ -41,9 +41,9 @@ def write_note(task_id: int): time = datetime.datetime.now().strftime("%y-%m-%d %H:%M") with open(notes_file, "w") as f: - f.write(f"%title: {task_description}") + f.write(f"%title {task_description}") f.write(f":task:{task_project}:{task_tags if len(task_tags) else ''}\n") - f.write(f"%date: {time}\n\n") + f.write(f"%date {time}\n\n") f.flush() os.execlp(EDITOR, EDITOR, notes_file)