Skip to main content
3 of 3
edited tags
Justin Ethier
  • 17.2k
  • 9
  • 46
  • 55

Spell check comments in vim

I'm a C/C++ professional programmer who makes lots of spelling mistakes in comments. I want to configure vim such that the spell-checker only looks for misspelled words within comments. If necessary I'm willing to add special symbols around the comment that vim can look for to know where to check, such as:

 int main(){ /*<--C_S This is comment line in main function .. C_S-->*/ } 

If the plugin can work without the C_S symbols that'd be even better. I want the spell-checker to highlight any spelling mistakes it finds within comments. Does this already exist? Or is it easy to write myself?

Vikas Kumar
  • 419
  • 1
  • 4
  • 3