How to fix/convert space indentation in Sublime Text?

后端 未结 9 1189
梦谈多话
梦谈多话 2020-11-30 15:59

Example: If I have a document with 2 space indentation, and I want it to have 4 space indentation, how do I automatically convert it by using the Sublime Text editor?

9条回答
  •  旧巷少年郎
    2020-11-30 16:47

    You have to add this code to your custom key bindings:

    { "keys": ["ctrl+f12"], "command": "set_setting", "args": {"setting": "tab_size", "value": 4} }
    

    by pressing ctrl+f12, it will reindent your file to a tab size of 4. if you want a different tab size, you just change the "value" number. Te format is a simple json.

提交回复
热议问题