Skip to main content



      Home
Home » Newcomers » Newcomers » Formatter and typein(Why doesn't typein conform to formatter settings?)
Formatter and typein [message #1830263] Wed, 22 July 2020 07:55 Go to next message
Eclipse UserFriend
I have set the formatter settings to specific formats that I prefer. For example,
if(condition) 
    {
      whatever
    }

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.
joe

[Updated on: Wed, 22 July 2020 08:37] by Moderator

Re: Formatter and typein [message #1830272 is a reply to message #1830263] Wed, 22 July 2020 09:45 Go to previous message
Eclipse UserFriend
Is this for Java? There are formatter settings for Indentation -> Tab Policy -> Spaces only for both C and Java...
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: Wed Jul 23 18:33:06 EDT 2025

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

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

Back to the top