From c2aef0d0fa9edff7fcb803225d5c6841d857fa83 Mon Sep 17 00:00:00 2001 From: "ian.anderson" Date: Sun, 17 Jan 2021 11:21:36 -0800 Subject: [PATCH] Add support to automatically apply todo-lists for files named todo.md --- README.md | 2 +- doc/vim-todo-lists.txt | 6 +++--- plugin/vim-todo-lists.vim | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f7c83de..7b6d78f 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ directory. Usage ----- -Plugin is automatically applied for files with `.todo.md` extension. +Plugin is automatically applied for files named `todo.md` or with the `.todo.md` extension. ##### TODO Items diff --git a/doc/vim-todo-lists.txt b/doc/vim-todo-lists.txt index d02c3d2..03d52ec 100644 --- a/doc/vim-todo-lists.txt +++ b/doc/vim-todo-lists.txt @@ -20,8 +20,8 @@ CONTENTS *VimTodoListsContents* vim-todo-lists plugin is intended for TODO lists management. Current version contains only key bindings that simplify the navigation -between TODO list (should have '.todo.md' extension) items, creation and -update. +between TODO list (should be named `todo.md` or have `.todo.md` extension) items, +creation and update. ============================================================================== 2. Installation *VimTodoListsInstallation* @@ -43,7 +43,7 @@ directory. ============================================================================== 3. Usage *VimTodoListsUsage* -Plugin is automatically applied for files with `.todo.md` extension. +Plugin is automatically applied for files named `todo.md` or with the `.todo.md` extension. TODO Items ---------- diff --git a/plugin/vim-todo-lists.vim b/plugin/vim-todo-lists.vim index 2a7bfe9..5200b99 100644 --- a/plugin/vim-todo-lists.vim +++ b/plugin/vim-todo-lists.vim @@ -480,7 +480,7 @@ if !exists('g:vimtodolists_plugin') "Defining auto commands augroup vimtodolists_auto_commands autocmd! - autocmd BufRead,BufNewFile *.todo.md call VimTodoListsInit() + autocmd BufRead,BufNewFile todo.md,*.todo.md call VimTodoListsInit() autocmd FileType todo call VimTodoListsInit() augroup end