3 ms·
- Cutting and pasting code may change its functionality. Especially from a non-source medium like web pages. - I find myself fighting my editor's indentation a
by pjc50 12y ago
- Cutting and pasting code may change its functionality. Especially from a non-source medium like web pages.
- I find myself fighting my editor's indentation a lot more as a result. Hitting return at the start of a line in the middle of an existing chunk of code indents to the previous line's indentation not the current line's indentation.
- It's asymmetrical: code drifts off to the right as you go down. Together with the editor issue I've taken to inserting a single '#' at points of down-indentation to mark this.
- qzcx 12y agoYour first complaint can be easily solved with a good text editor. I use sublime and it will handle whitespace differences when pasting. I haven't had any trouble pulling from webpages. Secondly, it isn't any harder to indent after hitting return than to add a Bracket. Same number of keystrokes and again, a decent editor can fix this problem too. Lastly, this is just a personal preference. Clojure code also drifts right, but its just a matter of training your brain to interpret it.
- jameshart 12y agoHow can it handle whitespace differences when pasting correctly? I have a conditional block. I want to paste some code at the end of it. Do I want to paste it inside the condition, so indented the same as the preceding line - or outside the condition,so indented one level less than the preceding line? With a brace delimited language, if I put the cursor inside or outside the brace and paste, an editor has enough information to correctly indent it. With whitespace delimiting, the editor doesn't have enough information.
- njharman 12y agoNot supporting Copy & Paste is a feature.
- Retra 12y agoThose are valid complaints, but they are kind of on the same level as saying "I have to type 'int' to declare an int, what a drag!"
- cmdrfred 12y agoI have to click 'indent'? Ugh! I might as well write this in assembly.