-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
Code Composer Studio Theia
-
CCSNXT-3544
-
CCS_20.5.1
-
None
I would like to report a usability regression in the code formatting/auto-indent feature in the current version of Code Composer Studio (CCS), compared to eclipse-based version.
Previous Behavior (Legacy CCS):
# Keyboard Shortcut: Ctrl + I was used to trigger auto-indentation/code alignment.
- Full-file formatting: When selecting all code (Ctrl + A) and applying auto-indent, the editor cursor/viewport remained at the current screen position after formatting completed. The view did not jump elsewhere, allowing the developer to continue working without losing context.
- Indentation style: The formatter correctly handled and preserved various indentation widths as configured.
Current Behavior (Issues Observed):
# Shortcut Change: The Ctrl + I shortcut for auto-indent has been changed to a different, less intuitive key binding, breaking long-established muscle memory and reducing productivity.
- Indentation Width Limitation: The current formatter appears to enforce or default to 2-space indentation, which is inconsistent with common C/C++ embedded coding conventions (typically 4 spaces), and does not respect user preference properly.
- Cursor/Viewport Jump on Full-file Format: When performing a full-file auto-indent (Ctrl + A → format), the cursor and viewport jump to the end of the file after formatting. This is highly disruptive, as developers must manually scroll back to their working position after every formatting operation.
Expected Behavior / Feature Request:
Please restore or provide the following behavior:
* Re-enable Ctrl + I as the default shortcut for auto-indent/format, or at minimum allow it to be easily remapped without conflict.
- Ensure that after a full-file format operation, the cursor and viewport position are preserved (i.e., the editor should return to the same line/position that was visible before formatting).
- Allow the formatter to respect user-configured indentation width (e.g., 3 or 4 spaces) rather than forcing 2-space indentation.
Impact:
This regression significantly impacts daily development efficiency, especially for developers who frequently reformat code during editing. The viewport jump issue alone forces unnecessary manual navigation after every global format operation, which is a considerable interruption to workflow.