decker-edu / decker

A markdown based tool for slide deck creation.
GNU General Public License v3.0
60 stars 15 forks source link

Ignore temporary files with --watch #65

Closed kno10 closed 11 months ago

kno10 commented 11 months ago

Watch mode is nice, but it causes a lot of spurious reloads for me because of VIM.

Please add the following:

monofon commented 11 months ago

I remember reconfiguring my vim to avoid this years ago. I never got around to fixing that in decker.

There is however currently the meta data variable exclude-directories that allows exclusion of entire directories from watching. But that will not help you here.

I will look into it.

kno10 commented 11 months ago

A workaround for VIM probably is set directory=~/.cache/vim, but I assume others will be affected, too.

monofon commented 11 months ago

@salbeira can you please test this on Windows. Add

watch:
  exclude:
    - test/**/*.md

to decker.yaml and

touch test/decks/media-deck.md

should not trigger a rebuild.

monofon commented 11 months ago

@mbotsch @salbeira please give it a quick check before I close this.

salbeira commented 11 months ago

Works for touch but opening the files with vim triggers the reload as advertised - I guess the idea is to include a glob that ignores vim swapfiles specifically for users who want that?

monofon commented 11 months ago

That is the idea.