- Code: Select all
self.view.run_command("reindent")
Pretty simple. Now when swapping lines around you get this:
- Code: Select all
if (true) {
}
return true;
swap "return true;" line up
- Code: Select all
if (true) {
return true; <-- note the indentation
}
instead of the default behavior:
- Code: Select all
if (true) {
}
return true;
swap "return true;" line up
- Code: Select all
if (true) {
return true; <-- note the indentation
}