vim-notes icon indicating copy to clipboard operation
vim-notes copied to clipboard

Plugin breaks git commit with Vim

Open tobi-or-not opened this issue 12 years ago • 2 comments

I recently noticed that I was suddenly unable to write git commit messages with Vim. After writing a message in Vim, instead of staging the changes upon hitting :wq I have a new file in my Notes directory that contains the commit message.

I also noted that the highlighting inside the commit message template changed.

This plugin is great and I would be grateful if someone could (at least) point me into the right direction or verify the behavior.

tobi-or-not avatar Apr 02 '13 16:04 tobi-or-not

The only way I can think of that this would happen is if your current working directory is the notes directory. The file type mode and syntax highlighting are not triggered by a filename extension or anything -- any file in the notes directory will be treated as a note. Can that explain what happened?

xolox avatar Apr 17 '13 22:04 xolox

Hi @tobi-or-not ,

I had a similar problem and fixed it by not setting git buffers filetype to notes. You can check the fix at https://github.com/pedrosans/vim-notes

Hi @xolox , yes, one of my notes directory is also a working directory of a Git repo. So the autocommand in the filetypedetect autocommand group matched it for a note. As the project is not maintained for a while, I forked it to apply this fix and other fixes. Hopefully I can contribute back to your plugin.

Cheers

pedrosans avatar Aug 26 '17 04:08 pedrosans