Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plain text in markdown indents incorrectly #56863

Closed
caneridge opened this issue Aug 21, 2018 · 2 comments
Closed

Plain text in markdown indents incorrectly #56863

caneridge opened this issue Aug 21, 2018 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-autoindent Editor auto indentation issues wont-fix

Comments

@caneridge
Copy link

Issue Type: Bug

When editing a markdown document with these two lines (period denotes a space); tab set to insert 4 spaces:

....a
......b

Selecting lines a,b and pressing tab results in:

........a
........b

Rather than

........a
..........b

The auto indent setting does not change the behavior. I've disabled all of my markdown extensions and the behavior is the same with them or without them. I'd like the ability to have free-format text in markdown that indents by just inserting the indent amount before every line in the selected block.

When indenting this:

           ┌──────┐
           │      │
┌──────────▼────┐ │
│    Block 1    │ │
└───────────────┘ │
        │         │
        │         │
        │         │
        │         │
        ▼         │
┌───────────────┐ │
│    Block 2    │ │
└────────────┬──┘ │
             │    │
             └────┘

It becomes this:

            ┌──────┐
            │      │
    ┌──────────▼────┐ │
    │    Block 1    │ │
    └───────────────┘ │
            │         │
            │         │
            │         │
            │         │
            ▼         │
    ┌───────────────┐ │
    │    Block 2    │ │
    └────────────┬──┘ │
                │    │
                └────┘

VS Code version: Code 1.26.1 (493869e, 2018-08-16T18:31:26.156Z)
OS version: Darwin x64 17.7.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 3, 2
Memory (System) 16.00GB (0.60GB free)
Process Argv /Applications/Visual Studio Code.app/Contents/MacOS/Electron -psn_0_10865244
Screen Reader no
VM 0%
Extensions (4)
Extension Author (truncated) Version
vsc-material-theme Equ 2.3.0
vscode-docker Pet 0.1.0
code-spell-checker str 1.6.10
gitblame wad 2.4.4
@vscodebot
Copy link

vscodebot bot commented Aug 21, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@rebornix rebornix self-assigned this Aug 21, 2018
@vscodebot vscodebot bot removed the new release label Aug 21, 2018
@rebornix rebornix added bug Issue identified by VS Code Team member as probable bug editor-autoindent Editor auto indentation issues labels Sep 4, 2018
@rebornix
Copy link
Member

rebornix commented Nov 3, 2020

This is due to the limited architecture (regex based indentation rules and only support limited code styles), we may want to consider using formatters if they exist for indenation adjustment (if interested, we can discuss in #19847).

For this particular issue, if the indentation rules are leading to more trouble than having no auto indent, you can set editor.autoIndent to advanced to disable the regex based indentation adjustment or use auto formatting (editor.formatOnType, editor.formatOnPaste). As we don't have an easy good-enough fix for it, we close it for now and explore better solutions through issues like (#19847 and #34621).

@rebornix rebornix closed this as completed Nov 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-autoindent Editor auto indentation issues wont-fix
Projects
None yet
Development

No branches or pull requests

2 participants