Re: [NB 7.2 PHP] Tab/indent fails in editor

  • From: Geoff Hoffman < >
  • To:
  • Subject: Re: [NB 7.2 PHP] Tab/indent fails in editor
  • Date: Tue, 9 Oct 2012 13:23:40 -0700

The tab indent values are only part of the solution.

Switch to PHP from All Languages and check you have 0 for initial indentation. Also I have 4 spaces for continuation indentation, and 4 also for array declaration indentation.

Then also switch over to Category "Blank Lines" and look for a 1 where you might need a 0. I have:




On Tue, Oct 9, 2012 at 11:45 AM, trejder < " target="_blank"> > wrote:
Hi all,

I just don't get it...

In Options > Editor > Formatting I have both "Number of Spaces per Indend" and "Tab Size" set to 4 (four spaces). I have "Expand Tabs to Spaces" checked as well.

I set cursor at a line that has exactly this indent (four spaces). I hit enter. NB adds new line and set cursor to... eighth column. Giving it indent as it was set in default NB installation (8 spaces).

When I hit Shift-Tab to reduce indent, it correctly reduces it to four spaces. But when I hit Shfit-Tab again (remove indent at all) and then Tab (add indend) it again ignores configuration and adds 8-spaces long indent.

This strange (?) things happens only on new lines added by NB, by hitting Enter on existing one. If I hit Tab on any line that was already there, an indent of four spaces is correctly added.

This doesn't make sense for me at all. Is this some kind of bug or do I misunderstand, how indents works in NB?

Cheers,
Trejder






Connect with us on twittergoogle+facebook, or linkedin.

Catch our next training in Houston Oct 8 - 12Berkeley Oct 22 - 26Seattle Oct 29 - Nov 2Phoenix Nov 12 - 16 or See All.

This email, including any attachments, is for the sole use of the intended recipient and may contain confidential information. If you are not the intended recipient, please immediately notify us by reply email or by telephone, delete this email and destroy any copies. Thank you.



[NB 7.2 PHP] Tab/indent fails in editor

trejder 10/09/2012

Re: [NB 7.2 PHP] Tab/indent fails in editor

Geoff Hoffman 10/09/2012

[NB 7.2 PHP] Tab/indent fails in editor

trejder 10/09/2012

Project Features

About this Project

PHP was started in November 2009, is owned by Petr Jiricka, and has 236 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close