-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indent using ==
or =
on visual selection does not properly indent
#4205
Comments
let me add (background info: out of habit I use
|
@kschaab try putting this into your {
"key": "= =",
"command": "editor.action.reindentselectedlines",
"when": "editorTextFocus && editorLangId == jsonc && vim.active && vim.mode == 'Normal'"
} |
Excellent work around, thanks!
…On Wed, Aug 19, 2020 at 3:10 AM Phong ***@***.***> wrote:
@kschaab <https://github.com/kschaab> try putting this into your
keybindings.json
{
"key": "= =",
"command": "editor.action.reindentlines",
"when": "editorTextFocus && editorLangId == jsonc && vim.active && vim.mode == 'Normal'"
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4205 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABX5KBLZ3JKRAD4X5M6KIOTSBOQIXANCNFSM4JDQQT3A>
.
|
J-Fields
changed the title
Indent using == or = on visual selection does not properly indent
Indent using Oct 15, 2021
==
or =
on visual selection does not properly indent
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have been able to reliably reproduce this in json files, but not in other languages. Using == or = on visual selection does not always indent properly.
To Reproduce
In JSON if you have an improperly indented line and hit == it will not indent. However, let's say the previous line is indented properly, if you hit 2== from that line then the line that would not indent will now indent. It also works properly in select mode if there are lines that are indented properly in the selection.
== on line 3 does nothing
2== from line 2 indents line 3 as expected
= on 2 selected with 3 works as expected
= on 3 and 4 selected deindents 4 (not expected)
Expected behavior
== is contextual and should indent based on surrounding code.
The text was updated successfully, but these errors were encountered: