Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BibTeX files have historically bad support for commenting out parts of a file [1]. But the now standard replacement tool biber has reliabe support for % as comment character [2]. So let's add that. [1]: http://www.bibtex.org/Format/ [2]: https://tex.stackexchange.com/a/93982
- Loading branch information
0f94e96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example,
pandoc --to docx
throws error messages for this comment marker%
.Instead, what Vim recognizes as comment marker by his syntax highlighting and
pandoc
accepts as valid syntax is a comment marker0f94e96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be only valid on the top level, wouldn't it?
0f94e96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed.
0f94e96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does 0628c96 fix this? When the cursor is on the top level,
@Comment
should be used,%
otherwise.0f94e96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good work. However, the condition is that the cursor is on the beginning of the line; if not, even though it is on the line of the top level that reads, say
@article
, then the comment marker%
is used.0f94e96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though of a condition such as
line('.') ~=? '^@'
0f94e96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I adapted the condition accordingly.