vscode-emacs-mcx
vscode-emacs-mcx copied to clipboard
Feature request: Add Emacs "tab" handling
Have you considered adding support for the "tab" key doing indentation in the Emacs style? By default pressing "tab" does the standard VSCode operation of increasing the indentation by one level.
VSCode provides a editor.action.ReindentSelectedLines
operation but I've found it to be pretty buggy (for example, see https://github.com/microsoft/vscode/issues/121214).
Thank you for the suggestion. I will investigate how to implement it.
-
ReindentSelectedLines
impl: https://github.com/microsoft/vscode/blob/94c9ea46838a9a619aeafb7e8afd1170c967bb55/src/vs/editor/contrib/indentation/indentation.ts#L326-L375 - Indent operation generation: https://github.com/microsoft/vscode/blob/94c9ea46838a9a619aeafb7e8afd1170c967bb55/src/vs/editor/contrib/indentation/indentation.ts#L27-L137
- This looks so complicated...
This extension may help: https://marketplace.visualstudio.com/items?itemName=sakapoko.vscode-emacs-indent
Thanks for the pointer, I'm using that extension already. It's fine, but also relies on the buggy ReindentSelectLines
behavior.
The emacs-mcx.emacsLikeTab
setting is introduced since 0.51.0, and Tab
and C-i
work like Emacs' one when it's set as true
: https://github.com/whitphx/vscode-emacs-mcx#emacs-mcxemacsliketab
Please open an issue if its behavior is not correct.