Closed
Bug 478419
Opened 17 years ago
Closed 17 years ago
Bespin does not maintain character column indention upon creating new line
Categories
(Skywriter Graveyard :: Editor, defect)
Skywriter Graveyard
Editor
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 478370
People
(Reporter: ustice, Unassigned)
Details
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6 Ubiquity/0.1.5
Build Identifier:
When typing code in Bespin, and you are indented in using the standard format for c-like languages, when you press the ENTER key to create a new line, it does not maintain that same indention, which makes it difficult to keep the formatting of the code clean.
Reproducible: Always
Steps to Reproduce:
1. Open Bespin
2. Hit TAB
3. Hit ENTER
Actual Results:
New line starting at character column 0.
Expected Results:
New line starting a character column 4/5
Comment 1•17 years ago
|
||
dupe of bug 478370 ?
| Reporter | ||
Comment 2•17 years ago
|
||
I think that these are slightly different. Auto-indent would be when you end a line with a block opener (like '{') or do not end the line as in the case of an if statement that doesn't use brackets, or the like. It could be combined though with additional details.
Comment 3•17 years ago
|
||
Should the text auto indent when you split a line in half as well? Some editors will adjust it to the indent of the source line while others will just place it at the beginning of the next line. I currently have the code modified in my action.js to leave any lines split to goto the first position of the next line.
| Reporter | ||
Comment 4•17 years ago
|
||
I personally prefer that when the text is split that it goes to one tab-stop in from the current indention. This more follows convention such as if statements on two lines:
if (x < 0)
doSomething();
It also signifies that it is related to the line above in some way.
Once again, this may just be a personal preference.
Comment 5•17 years ago
|
||
Issue is atm there is no exact way to tell through a syntax when a new line should be indented. The current code I have ignores any syntax based indenting and only cares about where the parents indent was at (parent started at column 4 child will start at 4 even if last character on the column was {). I'll play around to see about the syntax based indents as well.
Comment 6•17 years ago
|
||
At this point, auto-indenting (as per bug 478370) means exactly was described in comment 0 in this bug. As such, I'm marking this as a DUPLICATE of bug 478370.
If you'd like magical, syntax-aware indenting, file a new bug once normal auto-indenting is implemented.
Severity: normal → minor
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → DUPLICATE
Whiteboard: editor
Version: unspecified → Trunk
Comment 7•17 years ago
|
||
This is a mass migration from Mozilla Labs :: Bespin to Bespin :: Editor.
Component: Bespin → Editor
Product: Mozilla Labs → Bespin
QA Contact: bespin → editor
Whiteboard: editor
Target Milestone: -- → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•