On Thu, 28 Jul 2022 at 20:49, Tim Lange wrote: > > > > On Thu, Jul 28 2022 at 02:46:58 PM -0400, David Malcolm via Gcc > <gcc@gcc.gnu.org> wrote: > > Is there documentation on setting up text editors to work with our > > coding style? A lot of the next generation of developers aren't using > > vi or emacs; they's using VS Code, CLion, and other editors. Does > > anyone have docs on e.g. how to set up VS Code, CLion, etc (IntelliJ > > ?) > > to work well on GCC's own code base. FWIW I use Emacs; I've dabbed > > with VS Code but haven't used it "for real". > > I did prepare my first patch(es) with vscode. For debugging, I set up > vscode to launch gcc with gdbserver as wrapper and then let the vscode > debugger to connect to the gdbserver. At first, I tried to get the gnu > coding style to work in the hacky way by using tabSize=8 and rebinding > tab to 2 spaces but later ditched that because it bothered me more than > doing just spaces and replacing 8 spaces with 1 tab before sending the > patch. That still wastes time because all files that I didn't touch > look ugly unless I temporarily change the tabSize and some comments > don't use tabs so I can't just replace all 8 spaces with 1 tab.
That's what unexpand(1) is for: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/unexpand.html