Skip to main content



      Home
Home » Newcomers » Newcomers » Disabling automatic indentation in 3.1 Java editor
Disabling automatic indentation in 3.1 Java editor [message #105358] Tue, 27 September 2005 15:15 Go to next message
Eclipse UserFriend
Originally posted by: kmcounse.provbank.com

I am trying to disable all automatic indentation in the 3.1 Java editor so
that when I hit Enter I just get a newline.

So far I've tried:

1. Creating a new Preferences > Java > Code Style > Formatter with all of
the boxes in the Indent panel of the Indentation tab deselected. I also
tried this with a Mixed value for Tab Policy and Indentation size of 0.
The best this buys me is that nothing gets more indented than the
preceding line.
2. Removing all of the templates (drastic, perhaps) from Preferences >
Java > Editor > Templates. Deselecting the "Use code formatter" option
didn't seem to help either.

I've also poked around in the help docs and Googled quite a bit, but no
joy.

Thanks much for any pointers or suggestions.

Keith
Re: Disabling automatic indentation in 3.1 Java editor [message #105598 is a reply to message #105358] Wed, 28 September 2005 05:57 Go to previous messageGo to next message
Eclipse UserFriend
Keith Counsell wrote:
> I am trying to disable all automatic indentation in the 3.1 Java editor
> so that when I hit Enter I just get a newline.

You can disable smart insert mode (Edit > Smart Insert Mode) and you
will get only very basic auto-indentation (same indent than the line you
are at). There is no easy way to get no indentation at all (see
JavaAutoIndentStrategy for where you would need to start hacking).

Just curious - what is it you don't like about auto-indentation?

-tom
Re: Disabling automatic indentation in 3.1 Java editor [message #105625 is a reply to message #105598] Wed, 28 September 2005 08:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kmcounse.provbank.com

Tom Eicher wrote:

> You can disable smart insert mode (Edit > Smart Insert Mode) and you
> will get only very basic auto-indentation (same indent than the line you
> are at). There is no easy way to get no indentation at all (see
> JavaAutoIndentStrategy for where you would need to start hacking).

Fair enough. Thanks for setting me straight and for the hint.

> Just curious - what is it you don't like about auto-indentation?

I don't dislike it per se (some of my best friends are auto-indenters),
but it triggers an enter-tab-swear-backspace cycle. It's a deeply
ingrained habit to do it myself, and to be honest it both distracts and
annoys me that I can't get the editor to insert only the things that I
actually type.

Maybe I'm at the age where I start complaining about missing the good old
days and all this darn fool newfangled whiz-bang technology...

Thanks again!
Re: Disabling automatic indentation in 3.1 Java editor [message #105980 is a reply to message #105625] Thu, 29 September 2005 04:29 Go to previous message
Eclipse UserFriend
Originally posted by: hendrik_maryns.despammed.com

Keith Counsell schreef:
> Tom Eicher wrote:
<snip>
> I don't dislike it per se (some of my best friends are auto-indenters),
> but it triggers an enter-tab-swear-backspace cycle.

Then you can probably save yourself some keystrokes by replacing the
last backspace by Ctrl-z.

It's a deeply
> ingrained habit to do it myself, and to be honest it both distracts and
> annoys me that I can't get the editor to insert only the things that I
> actually type.

Then just type ahead and do Format from time to time (Esc Ctrl-f on
Linux, Ctrl-Shift-F on Win IIRC).

--
Hendrik Maryns

==================
www.lieverleven.be
http://aouw.org
Previous Topic:Could not find framework/Linux
Next Topic:index.jsp
Goto Forum:
  


Current Time: Thu Sep 25 22:22:01 EDT 2025

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

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

Back to the top