Menu

#193 Tab-based indenting in editor

open
nobody
None
5
2012-09-26
2003-07-27
No

Currently one can't say that Dev-C++ supports tabs.
Following is a list of problems/suggestions on the topic.

1:

Excepted behavior, when "use tab character" is selected:
Tabs stay tabs and spaces stay spaces.

What actually happens:
When writing tabs at the beginning of the line,
followed by a space, the instant that space char is
inserted, all tabs preceeding it are turned into spaces
(each tab gets converted into one space).

"Backspace unindents" also suffers from this same bug:
when it should leave three tabs, it actually leaves
three spaces.

2:

Intelligent C auto indent would be useful, and to make
it work properly with the tabs you must:
-use tab chars and only tab chars for indentation level
(ie. one tab char for every level of open {}).
-use spaces and only spaces for any other indentation
(smaller indents, such as a clause that is divided on
several lines).
-use spaces and only spaces for aligning anything
(function call with parameters divided on several
lines), but still keep the normal number of indentation
tabs on the line beginning.

You must NOT:
-use combination of tabs and spaces to indent to
arbitrary columns (for example, use 5 spaces to indent
to column 5, 1 tab and 2 spaces to indent to column 10
and so on).
-use tabs anywhere else than the very beginning of a line.

Doing either of those breaks on the instant user
chooses a different tab width.

3:

Intelligent smart tab would be useful too: it should
choose which characters to use based on the previous
line: if the previous line uses tab at some point, so
should it. Also, if there is no previous line to take
example of, it should use tab chars only at the
beginning of line (before no other chars than tab are
entered), and just use 8 spaces anywhere else.

The value of 8 could be configurable, but it probably
should not use the tab width value, which often has
very different use.

4:

When "keep trailing spaces" is disabled, it should also
remove all trailing tabs (and the option should be
renamed to reflect that).

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.