kdevelop 2.1 fixes (indentation, etc)
Kuba Ober
kuba at mareimbrium.org
Tue May 28 21:13:21 BST 2002
Hi,
I'm working on following for kdevelop 2.1. It's mostly done, but I'm open for
suggestions:
- make indentation actually work (can this be be ported to kate????)
- finish the polish translation
- clean compile under gcc 3.1 (add missing std::'s in a few places)
The desired indentation behaviour as far as I could deduce from the current,
completely broken one, is:
// "enter indents" -- special behaviour of newline
// 1. generally, the new line is filled with same whitespace as
// the first non-empty line above it
// 2. if the current cursor is enclosed by the brace pair,
// the closing brace gets delegated to a new line of its own
// TODO: check for "normal text" attribute, do not indent otherwise
// 3. if either the last character, or a character preceding the cursor
// is an opening brace, the new line is indented a level deeper
// TODO: check for "normal text" attribute, do not indent otherwise
// 4. TODO: if a parenthesis with "normal text" attribute is opened,
// and not closed, newline will indent to one cell to the right
// of the opened parenthesis -- say continuation of if (a || <newline>,
// multiline function parameters, etc.
// (1) is enabled by cfAutoIndent
// (2,3) are enabled by cfIndentBraces (new flag)
// (4) is enabled by cfIndentParentheses (new flag)
// "tab indents" -- special behaviour of tab
// 1. treat the first non-empty line above the current one as baseline
// 2. if the current line has closing brace "}" as its first character,
// then decrease the baseline indentation by one level
// 3. if the current line has less indentation than the baseline,
// replicate the baseline indentation here
// 4. if the current line has same or more indentation than the
// baseline, add one indentation level (this makes tab never do nothing,
// which was very annoying in 2.1)
// (3,4) are enabled by cfTabIndent
// "backspace (un)indents" -- special behaviour of backspace before text
// 1. set indentation to that of the first non-empty line above
// it that has less indentation than the current line
// (1) is enabled by cfBackspaceIndent
Does this make sense? As far as implmentation goes, newline's non-TODO items
work flawlessly for me both when using spaces (replace tabs is checked), and
tabs (replace tabs is unchecked).
I found current indentation behaviour tiresome when indenting with tabs (ala
linux kernel style), so I finally forced myself to fix it.
Cheers, Kuba Ober
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list