简体   繁体   中英

Is there any way to reindent lines in Swift Playgrounds 4?

Been playing around writing SwiftUI apps on Swift Playgrounds 4 and it automatically indents lines properly as you write them, but I don't see a method for reindenting all the lines in a selection or in a file.

Obviously when you're writing SwiftUI you often embed or un-embed elements in stacks, navigation views, and other blocks so reindenting is a frequent need to keep code readable.

Seems you have to delete and reinsert a line break on each line to automatically reindent the lines or manually insert a tab on each line one at a time. You can't even select several lines at once at press tab to indent them all at once, it just overwrites the selection with the tab.

Is there really no quick way to reindent lines in Swift Playgrounds 4?

Ohh if you hold down the ⌘ cmd key it shows all the keyboard shortcuts.

Re-indenting is ^ control + I

Not sure how you'd do this if you didn't happen to have a hardware keyboard though…

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM