Bug 361685 - [typing] tab indent - simple plain text editing should be provided as a sane fallback.
Summary: [typing] tab indent - simple plain text editing should be provided as a sane ...
Status: CLOSED DUPLICATE of bug 85883
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-21 12:00 EDT by davidianwalker CLA
Modified: 2012-01-29 13:12 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description davidianwalker CLA 2011-10-21 12:00:27 EDT
Build Identifier: Build id: 20110218-0911

Apart from the benefit to disabling any auto insertion/formatting from a bug workaround perspective and user expectation perspective (if I can disable all these ideas, I can circumvent any implementation issues), as a baseline a coding environment should provide an environment where coders are in total control without interference from the software.

I believe this is an axiom - see the first paragraph at Wikipedia on this.
"self-evident", "taken for granted", "serves as a starting point", etcetera.

This is not a technical matter but a policy decision.
The deliberate policy decision to disallow this natural behaviour is in my opinion a mistake.
Not only does it obstruct moving between simpler, more transparent environments and Eclipse it no doubt provides many "gotchas", overrides "least surprise", and is without doubt on my part the cause of some frustration and associated key pressing.

Please provide an environment for coders who like WYTIWYG - "what you type is what you get" which could be re-stated as "don't add anything extra to what I do if I don't want you to".

An obvious example of how this is broken ...
If I stare at the keyboard and type 500 lines of code, which might be something I do all the time in other environments and do very effectively, look at the monitor to find a mess - tabs all over the shop, i.e. unreadable code, I will go looking to turn that stuff off.
If I can't do that, I'll probably be moving elsewhere.

It's not about auto insertion/completion/addition being wrong.
Those are enhancements and not baselines.
Providing a baseline for everyone who writes code no matter where they come from in my opinion delineates good environments.
If I learn from a textbook and understand that I should tab indent my code ... and that requires pressing the tab key ... I should be able to do that at a minimum.

http://www.eclipse.org/forums/index.php/t/250629/

Reproducible: Always

Steps to Reproduce:
1. Use Eclipse.
2. Notice things are being added by the software.
3. Troll through configuration menus for an hour or so.
4. Spend a couple of days at the forums.
5. Realize Eclipse is forcing me to accept developer opinions on how I should type code.
6. File a PR.
7. Fall back to typing code elsewhere and copying and pasting into Eclipse.
Comment 1 Deepak Azad CLA 2011-10-22 12:17:13 EDT
(In reply to comment #0)
> Not only does it obstruct moving between simpler, more transparent environments
> and Eclipse 

I think 'moving between different coding environments' is a strong enough point to allow to disable all bells and whistles from editors in Eclipse.
Comment 2 Deepak Azad CLA 2011-10-22 12:21:12 EDT
Pressing 'enter' at the end of a line places the caret on the new line at the same column/alignment as the previous line. 

=> There is no way to disable this, the Smart Insert mode only governs the 'smart' tabbing, however if it is disabled we *always* indent to the same column as the last line.
Comment 3 davidianwalker CLA 2011-10-22 22:10:49 EDT
(In reply to comment #1)
> I think 'moving between different coding environments' is a strong enough point
> to allow to disable all bells and whistles from editors in Eclipse.

I agree 100%.
This stands on its own irrespective of any other consideration.

When you can't account for every implementation of "the principle of least surprise", have no surprises at all (as a fallback).
Comment 4 davidianwalker CLA 2011-10-22 22:41:22 EDT
(In reply to comment #2)
> => There is no way to disable this, the Smart Insert mode only governs the
> 'smart' tabbing, however if it is disabled we *always* indent to the same
> column as the last line.

Agreed.

As an aside, that's not global either.
If I have a project open, set that mode, open something else, I need to set that again - it's at least on a per project basis (and appears to also be on a per file basis).

open a project > open a file > set mode > copy and paste original file into same project > mode is unset on new file (or at least goes to default)

Consideration in implementation could be given to global (and persistent) either for this (Smart Insert) or for the above mentioned option.
Comment 5 Deepak Azad CLA 2011-10-22 23:47:41 EDT
(In reply to comment #4)
> As an aside, that's not global either.
Not entirely true as you can simply disable stuff from Java > Editor > Typing preference page.
Comment 6 Dani Megert CLA 2011-10-24 04:35:14 EDT

*** This bug has been marked as a duplicate of bug 85883 ***
Comment 7 Richard Mullen CLA 2012-01-29 13:12:22 EST
I realize this is a duplicate bug. I need to add my comments. I completely agree that not having the ability to default to not having "Smart Insert Mode" on is causing me a tremendous amount of time spent. Much code I work with is formatted differently from how Smart Insert Mode formats the code. I am required to suport the present formating.
  I know "Smart Insert Mode" can be turned off for individual files. Unfortunately it defaults on again when the editor is restarted. I would suggest that the selection for Smart Insert Mode be used for all files opened during a session and be retained by the editor.
Or add a disable "Smart Insert Mode" preference.
I know that this was discussed and the result was that it won't be fixed. I am just adding another voice and letting you know that this is extremely disruptive to my use of the editor.