When using the editor.action.indentLines command (⌘] by default) to indent a selected block in VScode, I find that it doesn’t just add the current indentation value to the start of the lines – it reindents them by indentation-logic, that sometimes isn’t correct for the current file.
As an example, with this block selected:
·- name: Test SSH connection to remote host
···ansible.builtin.ping:
···ignore_unreachable: true
···ignore_errors: true
···register: pingtest
···tags:
····- always
····- ping-gather
… pressing ⌘] results in:
···- name: Test SSH connection to remote host
······ansible.builtin.ping:
······ignore_unreachable: true
······ignore_errors: true
······register: pingtest
······tags:
······- always
······- ping-gather
This is frustrating, and something I have to constantly fix. Is there a configuration option I can set that will force indentation to be simple/stupid, and only indent by a fixed number of spaces, maintaining any indentation within the selected block as-is?