Closed KillTheMule closed 12 months ago
This indentexpr
is very basic. If you find edge cases please report them! :smile:
Apologies if this is the wrong place for this question, but I find the indenting behavior odd when used in conjunction with DelimitMate. Here is a bit of the output from :DelimitMateTest
:
Open: (|)
Delete: |
Exit: ()|
Space: ( | )
Delete space: (|)
Car return: (
|
)
Delete car return: (|)
Open: [|]
Delete: |
Exit: []|
Space: [ | ]
Delete space: [|]
Car return: [
|
]
Delete car return: [|]
Open: {|}
Delete: |
Exit: {}|
Space: { | }
Delete space: {|}
Car return: {
|
}
Delete car return: {|}
In particular, notice that when (
and [
are expanded by pressing Enter that the closing )
and ]
, respectively, are also indented. The desired behavior is shown for {
followed by Enter wherein the closing }
is not indented.
The builtin indenting doesn't really work nicely (setting
cindent
helps a bit though), so it would be awesome to provide anindentexpr
.