autocommenting

Is there a keyboard shortcut in Insert mode to tell vim that I don't want to be inside a comment any more?

纵然是瞬间 提交于 2019-12-21 15:14:14
问题 When I write // comments in Java, and press Enter, vim helpfully adds a // to the beginning of the next line. // This is the first line of my comment <CR> // <-- these were added automatically by auto-comment. As I say, this is helpful behaviour (I use // for multi-line comments to make it easy to comment out large blocks of code with /*...*/ , and use /**...*/ only for Javadoc comments). But when I've reached the end of a comment, I have to press the backspace key three times to get rid of

Is there a keyboard shortcut in Insert mode to tell vim that I don't want to be inside a comment any more?

点点圈 提交于 2019-12-21 15:13:14
问题 When I write // comments in Java, and press Enter, vim helpfully adds a // to the beginning of the next line. // This is the first line of my comment <CR> // <-- these were added automatically by auto-comment. As I say, this is helpful behaviour (I use // for multi-line comments to make it easy to comment out large blocks of code with /*...*/ , and use /**...*/ only for Javadoc comments). But when I've reached the end of a comment, I have to press the backspace key three times to get rid of