C or C++ indentation and effects; how can I turn off ?
The C mode indentation is supposed to make editing 'C' easier, by forcing the user to follow a preset editing convection. The layout is pretty standard, following a 4 space indent, writing either K&R or standard 'Pascal' type layout, with braces aligning vertically.
The problem most new users have is the inability of the tab key to function, or more simply do not want to be 'forced' to write in a particular style (GNU writers will probably not like this either - conversely they will be using GNU emacs !!). However the constrained layout can be configured to create most styles and does help in a project situation, whereby most of the authored code roughly adheres to the same sort of layout conventions. For C++ users then edit "hkcpp.emf" rather than "hkc.emf".
To disable ALL automatic layout in C and C++ files then from the menu
help -> Buffer Setup -> Setup Auto Indent
Or from the command line esc x buffer-setup and disable through the dialogue.
Restart the editor.
To retain the 'C' layout aid, but re-enable the tab key operation then disable the Tab To Indent option in user-setup(3) i.e.
Help -> User Setup -> General -> Tab To Indent
This enables the use of the TAB key in all column positions with the exception of column 0. A <tab> in Column 0 will still enable the automatic line re-formatting.
If you want real <Tabs> then disable the tab mode using user-setup(3) i.e.
Help -> User Setup -> General -> Tab
The 'C' layout indentation is controlled from the indent(2) command (see hkc.emf), the indentation level is controlled by the variables $buffer-indent-width(5) and $buffer-indent(5) these may be changed in the Buffer Setup dialog.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2006/08/24
Generated On: 2006/10/07