Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

vim

javadoc

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.

like image 778
Austin R Avatar asked Jan 22 '26 12:01

Austin R


1 Answers

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
like image 70
Don Reba Avatar answered Jan 24 '26 17:01

Don Reba



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!