Block comments (/* */) Preferences setting to disable automatic "*" added for each newline


When entering a block comment (/* comment here */), if I press Enter, Komodo IDE automatically adds " * ". There are many circumstances when no extra “*” is desired. There should be a setting in Preferences (probably a section in Smart Editing) to allow the user to disable this behavior.


This is supposed to be Editor: Insert Newline in the key binding prefs. If you WANT the comments then you would use Shift + Enter (Editor: Insert Newline (continue comment)). But I guess that’s not how it works in JS files :S.

I’m not sure why there is a different command. I feel like the suggest pref here would have been a better way to go rather then implementing different commands.

If we go with this then we could eliminate these commands possibly. There are FIVE different new line commands…

  • Carey


Wow. That’s a lot :slight_smile:


I hate those extra “*”, I always have to delete them.


Agreed. I can’t think of a single instance when I did not have to delete them.


I just remembered this post because I had to write a lot of comments today deleting the extra “*”.



At the time, I was tempted to write a macro to handle them, but it was one of those cases of faster-just-to-do-it-than-automate-it. :slight_smile:


I just tested this, but there is a command in you’re keymap “Editor: insert newline (align with current line)”.
If you use this command ( for me Ctrl + Shift + Return ) it will not continue the comment with a *.

If you never want to continue the comment with a *, you can probably just replace the default Return command with this command in you’re keymap settings.


Thank you for that tip. Even though it does leave the cursor in column 2 (so you have to hit Backspace once to begin typing the comment text in column 1), it does avoid having to Backspace to delete any unwanted additional “*”. Also, once that first line of comment text has been entered, when you press Return to begin entering the second line of comment text (if any), no further Backspaces are needed.


If you want to go back to the first column, the command “Editor: Insert newline (no favors)” is the command ( for me Ctrl + Return ) that you want to use. This will bring you to the first column instead of keeping the indentation allignment of the previous line.


Thanks! I hadn’t even noticed that entry in the keybindings list.