Skip to content

S/cc doesn't auto indent on empty line #1017

@alnorris

Description

@alnorris

When your in Normal mode and your on an empty line and the cursor is at the very left, pressing 'S' in normal Vim auto indents the line and goes into insert mode, but VS Vim doesn't seem to indent at all.

Technical details:

  • VSCode Version: 1.6.1
  • VsCodeVim Version: 0.4.0
  • OS: OSX El capitan

What happened:

  • Typing cc when cursor is at col 0 and in block on empty line: Jumping to input mode, but won't indent correctly
  • Typing cc when cursor is at col 2 (or any col): Removes line and ends up at col 0 with no indentation
  • Typing cc when cursor is at col 0 but there is valid code on line that is inside a block: Removes line as it should do, but cursor ends at col 0 with trailing whitespace
  • Typing cc when cursor is at col >2 (in block, line with valid code, cursor on code): Removes line of code and indents correctly ✅

Here all of those scenarios in a GIF (with tab width of 3 instead of 2)
cc

Contributed by @lumio at #1828.

What did you expect to happen: Typing cc will always clear the line, indents it and cursor jumps to end of line.

How to reproduce it: See above, but typically typing cc on different col positions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions