This post is not about curly brackets. It is about parentheses.
I couldn't find a solution on how to expand parentheses with my ideal indentation.
What happens now with expanding parentheses
Before
(|)
Input
<CR>
After
(
|
)
What I want
Before
(|)
Input
<CR>
After
(
|
)
I have delimitMate installed, but I don't think this is delimitMate's problem because it produces the same output without delimitMate. Yes, I experimented it.
The closest I've gotten was with filetype indent off
, which successfully aligns the closing parenthesis with the opening one. However, the cursor's position ends up where I don't want it to be.
What happens with the filetype option and delimitMate
Before
(|)
Input
<CR>
After
(
|
)
What heppens with the filetype option and without delimitMate
Before
(|)
Input
<CR>
After
(
|)
Ideally, I want a solution with delimitMate installed, but I think a solution without delimitMate will be a good foundation to solve this with delimitMate. So, I want to hear any solution to this with or without delimitMate.
v_=
(although it can be inconsistent). Tryset indentexpr=
and/orset cindent cino=m1
smartindent
,autoindent
, etc., and decide if those are set to the correct values. Frankly this type of thing is an issue in most "auto delimiter" style plugins—it's probably a corner case. The plugin authors might be able to help. Otherwise, you might want to make a mapping that does what you want