my editor is replacing tabs with spaces and I want it to stop. To be clear, when I press tab the editor puts 2 spaces where the cursor is and I want it to put 1 tab because the current behavior is messing with the WordPress coding Standards. I have looked up about 1000 articles from google searches on how to fix this and nothing is working. Any ideas?
CodePudding user response:
You need to disable both of these settings:
Editor: Insert Spaces
// Insert spaces when pressing
Tab
. This setting is overridden based on the file contents wheneditor.detectIndentation
is on.
and
Editor: Deteect Indentation
// Controls whether
editor.tabSize#
and#editor.insertSpaces
will be automatically detected when a file is opened based on the file contents.