Closed
Bug 514896
Opened 15 years ago
Closed 15 years ago
Implement auto indent when user press enter key (phase 1)
Categories
(Skywriter Graveyard :: Editor, enhancement)
Skywriter Graveyard
Editor
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 478370
People
(Reporter: BijuMailList, Unassigned)
Details
Most text editors gives an auto indent feature.
Some editors even have "smart auto indent" feature, ie, indent to same level or a level deeper depending upon language syntax.
Example: if you type "if (some_expression) {" and press enter key it indent a level deeper. But if you type "some_function(with_parameters);" and press enter key it indent to same level.
Adding smart indent may be as complex as doing auto code formatting and depends on language. So as intermediate step we should at least implement a simple "auto indent" ie, in all case auto indent to same level when user press enter key. I think that is simple to implement.
Comment 1•15 years ago
|
||
This is already present. Make sure you have `set autoindent on` in the command line.
This is a DUPLICATE of bug 478370. (If you'd like to request smart autoindent, on the other hand, then please file another bug.)
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Comment 3•15 years ago
|
||
(In reply to comment #2)
> but why `set autoindent on` is not on by default ?
That's a good question. I'll look into it and see if we could get it turned on.
I am asking to turn it on by default because bespin is mainly for editing code.
and all programming languages recommend proper indentation
Comment 5•15 years ago
|
||
(In reply to comment #4)
> I am asking to turn it on by default because bespin is mainly for editing code.
> and all programming languages recommend proper indentation
No, I know. I agree with you, and so do other members of the Bespin community. It turns out that there isn't a default value specified for 'autoindent' at all, so it is just automatically considered 'off'.
You need to log in
before you can comment on or make changes to this bug.
Description
•