Setting up editors for the GNU/GCC coding style?
Martin Liška
mliska@suse.cz
Mon Aug 1 10:50:45 GMT 2022
On 7/28/22 21: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. For reference, my config files for gcc are available at [0].
There's a vscode issue that is about the unsupported expansion of 8 spaces to a tab:
https://github.com/microsoft/vscode/issues/42740
Btw. can we for the future leave this weird mix usage? Is it really an useful selection?
Cheers,
Martin
>
> - Tim
>
> [0] https://gist.github.com/timll/1c4c542c7c98e3610c14aec19cdf7e91
>
>>
>> I'm hoping to add this to my newbies guide.
>>
>> Thanks
>> Dave
>>
>
>
More information about the Gcc
mailing list