-
Notifications
You must be signed in to change notification settings - Fork 50
Eclipse Ctrl+Shift+C commenting and tab levels #837
Description
Eclipse IDE has the default shortcut Ctrl+Shift+C that comments either the selected lines or the current one. When working with Clojure code, the shortcut effectively places the ; comment maker at the beginning of the line. This leads to the situation when such comments break tabbing because the tab level of all lower lines is discarded and they auto-tab to column 0, right where there's the upper ; character.
So, it turns out that either 1) the Ctrl+Shift+C shortcut is mostly useless when dealing with Clojure code, which is a really pity miss, or 2) if I nevertheless use it, I am forced to do lots and lots of manual formatting which kind of defeats its purpose anyway.
Out of the top of my hat, I can propose two solutons: either 1) ignore ; characters of higher lines when reindenting lower lines, or 2) make Ctrl+Shift+C put the ; right before the form, at its correct indent, not at column 0.
UPDATE it may be of interest to see what Eclipse does with Java code edited in the same way and then formatted with Ctrl+Shift+F - it takes the liberty to reformat both the indentation and the amount of space between // and the first character of the following string.