Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Formatter and typein(Why doesn't typein conform to formatter settings?)
Formatter and typein [message #1830263] Wed, 22 July 2020 11:55 Go to next message
joseph newcomer is currently offline joseph newcomerFriend
Messages: 15
Registered: July 2017
Junior Member
I have set the formatter settings to specific formats that I prefer. For example,

and to never, ever, under any conditions imaginable, to put a tab character in my file. Yet new code I type in does not obey these rules, and I get weird indentations and actual tab characters. I do not want to reformat the entire file to get the formatting rules obeyed; I want the code to go in properly as I type it. What do I have to do to get the indentations I want (Note: above code sample is not to scale; as long as the braces are indented and the code indented beyond the braces I will be happy).

Also, if I wanted to make a variant plugin that really did what EMACS used to do for me, I would be ecstatic. I had my C-mode styles tuned to perfection. What should I be looking at to see how to make my program text go in the way I want it to?

I have a strong belief that it is not the role of the editor to tell me what my code should look line; it is the job of the editor to make my code look how I want it to look. I have been fighting eclipse for a year on this. I accidentally hit whatever key sequence caused a reformatting, and one of my files became unintelligible. So now my files start with
// @formatter:off

lest this happen again. Note that the problem of not following the formatting style was present before I added these comments.

[Updated on: Wed, 22 July 2020 12:37]

Report message to a moderator

Re: Formatter and typein [message #1830272 is a reply to message #1830263] Wed, 22 July 2020 13:45 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31608
Registered: July 2009
Senior Member
Is this for Java? There are formatter settings for Indentation -> Tab Policy -> Spaces only for both C and Java...

Ed Merks
Professional Support:
Previous Topic:Workspace for multi user error
Next Topic:Unable to Install e4 developer resources plugin in eclipse via jar files
Goto Forum:

Current Time: Fri Nov 27 00:25:30 GMT 2020

Powered by FUDForum. Page generated in 0.03307 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top