Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to customize indentation in C, C++, and Java buffers?

0
Posted

How to customize indentation in C, C++, and Java buffers?

0

The Emacs cc-mode features an interactive procedure for customizing the indentation style, which is fully explained in the CC Mode manual that is part of the Emacs distribution, see section `Customization Indentation’ in The CC Mode Manual. Here’s a short summary of the procedure: • Go to the beginning of the first line where you don’t like the indentation and type C-c C-o. Emacs will prompt you for the syntactic symbol; type RET to accept the default it suggests. • Emacs now prompts for the offset of this syntactic symbol, showing the default (the current definition) inside parentheses. You can choose one of these: 0 No extra indentation. + Indent one basic offset. – Outdent one basic offset. ++ Indent two basic offsets — Outdent two basic offsets. * Indent half basic offset. / Outdent half basic offset. • After choosing one of these symbols, type C-c C-q to reindent the line or the block according to what you just specified. • If you don’t like the result, go back to step 1. Otherwi

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.