For an individual file I have the following console commands that do the trick:
- Code: Select all
view.run_command("unexpand_tabs");view.run_command("set_setting", {"setting": "tab_size", "value": 4} );view.run_command("expand_tabs")
I'd like to do this programmatically across many files, not just the one open in the buffer. Is there a simple way to do this?
EDIT: I suppose I can just import os to iterate over files in a directory, so my specific question is how to do something like the run_command() above upon a file path instead of the current view.