Austin R
Austin R

Reputation: 795

How do I stop Vim from automatically highlighting the first sentence of my Java comments?

When I write JavaDoc-style comments in my code, Vim highlights the first sentence of them specifically:

enter image description here

Why does this happen? The problem occurs regardless of the colorscheme I use, so I'm assuming it has something to do with my java.vim file, but I've never modified it or anything.

Upvotes: 3

Views: 523

Answers (1)

Don Reba
Don Reba

Reputation: 14051

Like jackrabbit said, the first sentence in a Javadoc comment is special. Vim highlights it for you so that you clearly see what will be used as the comment summary in the generated documentation. Still, if it bothers you, you can disable Javadoc highlighting by defining java_ignore_javadoc in your vimrc file.

let java_ignore_javadoc=1

Upvotes: 2

Related Questions