Skip to content

indentkeys autoindent only at the start of line#2227

Merged
lervag merged 2 commits intolervag:masterfrom
BertrandSim:patch-2
Oct 29, 2021
Merged

indentkeys autoindent only at the start of line#2227
lervag merged 2 commits intolervag:masterfrom
BertrandSim:patch-2

Conversation

@BertrandSim
Copy link
Copy Markdown
Contributor

This PR prefixes the 'indentkeys' (,),],},\item,\else,\fi with a 0.
The effect is that these indent keys only autoindent the line when they are typed at the start of the line (see :h i_CTRL-F).
ie. no autoindenting when typing a closing ),],} mid-way through a statement.

(The assumption here is that one would not want an autoindent when, say, is in the midst of a long equation,
but only to autoindent when closing an existing block).

This PR prefixes the 'indentkeys' `(,),],},\item,\else,\fi` with a `0`. 
The effect is that these indent keys only autoindent the line when they are typed at the start of the line (see `:h i_CTRL-F`).
ie. no autoindenting when typing a closing `),],}` mid-way through a statement.

(The assumption here is that one would *not* want an autoindent when, say, is in the midst of a long equation,
but only to autoindent when closing an existing block).
@lervag
Copy link
Copy Markdown
Owner

lervag commented Oct 29, 2021

Thanks! I agree this looks sensible and will merge asap.

@lervag lervag merged commit 908576b into lervag:master Oct 29, 2021
lervag added a commit that referenced this pull request Feb 18, 2022
This reverts parts of f9d07de (see #2227).

refer: #2332
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants