8000 Add SmartIndent capability · Issue #16998 · microsoft/vscode · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add SmartIndent capability #16998
Open
Open
@IntelOrca

Description

@IntelOrca

Visual Studio has an extensibility point called SmartIndent:
https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.text.editor.ismartindent.aspx

This allows a language service to provide the editor, given a line, what the indentation level should be. If you click on a blank line in Visual Studio, it will automatically place the caret at the correct indent level based on the code above. This also works when using the arrow keys to move the caret. Currently in VSCode, it will place the caret at column 0 for blank lines.

This may come hand-in-hand with implementing virtual space (see #13960) as Visual Studio will not insert spaces, but just place the caret at the correct column in virtual space.

One thing to note is that in Visual Studio, when clicking on a blank line, the X position that you click at must be greater than the expected indentation column in order for this to work, otherwise it will place the caret at column 0. With the arrow keys, unless you are at column 0, your caret will always move to the correct indentation level for that blank line.

Metadata

Metadata

Assignees

Labels

apieditor-autoindentEditor auto indentation issuesfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0