Skip to content

Issues with indentation #2371

Closed
Closed

Description

@gilbertohasnofb

Some issues with indentation:

  1. Tab indents single and multi-line selections, but Shift-Tab works only for single lines.

  2. Shift-Tab moves a single line one indentation level to match the previous line, but does not move further left if the previous line happens to also be indented. For instance, if the cursor is on the third line below:

    def foo(x):
        if x > 1:
            return x 
    

    pressing Shift-Tab once will move that line one step back:

    def foo(x):
        if x > 1:
        return x 
    

    but pressing it once again will NOT result in the expected:

    def foo(x):
        if x > 1:
    return x 
    
  3. Multi-line indentation ignores the value set in Preferred Tab Width (mine is set to 4) and always moves by 2 spaces

I'm running Mark Text 0.16.2 on Linux Mint 18.3

Activity

  1. o5t6iaqo7 commented on Aug 21, 2021

    @o5t6iaqo7

    I am having this problem and it is very frustrating, a major functionality broken, macOS 11.5.2 and Mark Text 0.16.3. The fix suggested by emileoost #2466 (comment)

    worked but was very cumbersome. I downgraded Mark Text to 0.16.2 and it works fine, indent / outdent un-indent as in other editors. This issue has two open threads that could be combined so I have cross-posted this comment here and at:

    #2466 (comment)

  2. added
    🦁 need discuss
    on Jan 23, 2022
  3. tsbertalan commented on Sep 21, 2022

    @tsbertalan

    When I have Preferences>Markdown>Preferred list indentation set to "3", and I open this file:

    1. one
        1. a
        2. b
    2. two
    
    bullets
    - a
        - b
        - c
    - d
    
    tasks
    - [ ] a
        - [ ] b
            - [ ] c
            - [ ] d
        - [ ] e
        - [ ] f
    - [ ] g
    

    it gets modified immediately to

    1. one
         1. a
         2. b
    2. two
    
    bullets
    
    - a
        - b
        - c
    - d
    
    tasks
    
    - [ ] a
        - [ ] b
            - [ ] c
            - [ ] d
        - [ ] e
        - [ ] f
    - [ ] g

    That is,

    1. The numbered list gets reindented with 5 spaces,
    2. the paragraphs get extra newlines around them, and
    3. the final extra line is dropped.

    When I open instead with "Preferred list indentation" set to 4, it gets modified to

    1. one
          1. a
          2. b
    2. two
    
    bullets
    
    - a
         - b
         - c
    - d
    
    tasks
    
    - [ ] a
         - [ ] b
              - [ ] c
              - [ ] d
         - [ ] e
         - [ ] f
    - [ ] g

    That is,

    1. numbered indents are now 6 spaces,
    2. paragraphs again,
    3. final newline again,
    4. and the tasklists get indented with multiples of 5 space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🦁 need discuss

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions