1

I have a notes folder that is also a git repo with an autocmd in my init.vim set to auto-commit to the repo every time the file gets saved. This behavior is undesirable in git repo folders with actual code, so I was wondering how to selectively apply the rule to only one folder.

belkarx
  • 325
  • 1
  • 9
  • 2
    It might help to see how the autocmd is currently written, but it *should* work just to include the filepath when specifying what files you want the rule to apply to, `autocmd BufWritePost /path/to/notes/folder/* !git ...`. – frabjous Jun 01 '22 at 01:00
  • Thanks @frabjous, that worked :) – belkarx Jun 01 '22 at 14:39

0 Answers0