kdevelop 2.1 fixes (indentation, etc)
Roland Krause
rokrau at yahoo.com
Wed May 29 00:17:23 BST 2002
Kuba, please send us a patch for this.
The problem is, that the official development of KDevelop-2.1 has ended
now. But since the indentation stuff is soooo broken we can put the
patch against the release version up on our website. I do not think
that we want to committ anything towards the old KDE_2_2_BRANCH
anymore.
The next release of KDevelop will very likely be based on the new
codebase and the editor has completely been replaced with a
KTextEditor interface, currently implemented by a kate part. Unless
your fixes apply to kate, they are obsolete for any future version of
KDevelop.
Many thanks for this anyway,
Roland
--- Kuba Ober <kuba at mareimbrium.org> wrote:
> 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«
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
-
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