7 ms·
Part of the problem is that Xcode (you know, the editor pretty much everybody will be using to write Swift) leaves blank lines indented. So to leave a blank lin
by to3m 11y ago
Part of the problem is that Xcode (you know, the editor pretty much everybody will be using to write Swift) leaves blank lines indented. So to leave a blank line that doesn't have indentation, you press Return, and you get an indented blank line; you then need to press Backspace some appropriate number of times to get the cursor back to column 0; then you press Return.
(In Xcode's defence, the cursor is, then, at least indented.)
If you don't use Xcode, you might not realise how crap Xcode is.
- jashephe 11y agoWhile this is the default behavior, you can, at least in Xcode 7.2, check "Automatically trim trailing whitespace" and "Including whitespace-only lines" under "Text Editing" in Xcode's preferences.
- memco 11y agoIt might help you to use the OSX keyboard shortcut cmd + shift + [left, delete]. The left variant will move you to the beginning of a line, delete will clear all preceding characters and put the cursor on column 0.