in reply to Re^6: How would you indent this?
in thread How would you indent this?
I agree that the "editor shouldn't interfere automatically". One of the worst editors I ever worked with was the UCSD Pascal system which forced its own idea of indentation live while editing, including disallowing multi-line comments. I run perltidy occasionally to clean up after things like a big code refactor, and I pretty much always use it to clean up code from PerlMonks questions.
The impressive thing about perltidy is that I have tuned it to produce almost exactly what I write most of the time. Some of the modern C++ pretty printer type tools are pretty good too. Modern Visual Studio can do a pretty good job and the C++ Code Style Formatter provided by Eclipse is very configurable aside from some weird omissions (why does it insist on a space before a : in a constructor declerator list?). So yes, pretty printing tools can get extremely close to making the same code style decisions I do, partly because I have thought hard about my style choices and understand what I want to achieve, so results are consistent and fairly easy to codify.
I apologize for the perceived attack on emacs. Never fear, I treat vi equally. :-D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: How would you indent this?
by LanX (Saint) on Mar 18, 2021 at 21:22 UTC | |
by GrandFather (Saint) on Mar 18, 2021 at 21:45 UTC | |
by LanX (Saint) on Mar 18, 2021 at 21:55 UTC | |
by GrandFather (Saint) on Mar 18, 2021 at 22:16 UTC |