taskwiki icon indicating copy to clipboard operation
taskwiki copied to clipboard

adding two items to a list in insert mode glitch with vim-auto-save

Open sidequestboy opened this issue 5 years ago • 0 comments
trafficstars

When I start a task list, and write the first item:

== Some tasks to do ==
* [ ] do something

and I hit enter, taskwiki tries to add the task metadata to the line, but fails:

== Some tasks to do ==
* [ ] do somethin	
* [ ] g #c6977467

when I am still in insert mode, running task list in another terminal shows

 1 4s             do somethin                       0

then when I exit insert mode, task list shows

 1 17s             g                                 0
 2 17s             do somethin                       0

like #228, I have 907th/vim-auto-save installed and enabled. Disabling it fixes the problem, but makes me have to manually save the file obviously. @tom-doer ended up just disabling auto-save for taskwiki files - is there a way to fix this glitch while keeping auto-save enabled?

From the auto-save helptext:

The events on which AutoSave will perform a save can be adjusted using the
g:auto_save_events option. Using InsertLeave and TextChanged only,
the default, will save on every change in normal mode and every time you leave insert mode.

    " .vimrc
    let g:auto_save_events = ["InsertLeave", "TextChanged"]

So I'm not sure what event is making taskwiki do something while I'm still in insert mode - any ideas?

sidequestboy avatar Feb 27 '20 19:02 sidequestboy