Sublime Forum

If/else does not indent properly w/reindent

#1

I posted this originally on sublimetext.userecho.com/topic/8 … -properly/ but then realized under the support link on this website, it says use userecho.com for feature requests and this forum for support. Then looking at the userecho.com bug forum, I see that many are weeks old with no comment even. So, I am reposting here as the “Support” page says.

The code block (in the midst of more advanced code or not) does not indent properly using the reindent feature:

if { 1 } {
    puts "Hello" 
} else { 
    puts "Goodbye" 
}

The reindent option ignores the outdent on the } else { line. It indents to:

if { 1 } {
    puts "Hello"
    } else {
        puts "Goodbye"
    }
0 Likes

#2

I am looking at the language definition in attempts at figuring out a patch to submit. Are there docs somewhere that talk about how indentation is computed?

Thanks!

0 Likes