Page 1 of 1

ZS 9.0.x indentation problem

Posted: Fri May 25, 2012 3:41 pm
by flyingdr
Hello,

I've migrated from Zend Studio 7.1.2 to 9.0.3 and found that it have pretty nasty problem when trying to format code using spaces as indentation symbol: when you're trying to use Tab/Shift+Tab to (un)indent current line - PHP editor doesn't respect "tab stops". For example:

Code: Select all

.|$a = 1;
"." is for space char, "|" is for cursor position.
General -> Editors -> Text Editors -> Displayed tab width: 4
General -> Editors -> Text Editors -> Insert spaces for tabs: true

If in this situation I press Tab - I expect to get this:

Code: Select all

....|$a = 1; <-- Code get moved to next tab stop (position 4)
but actually I got:

Code: Select all

.....|$a = 1; <-- Code is moved by tab width (position 5)
ZS 9.0.1 - 9.0.3 are all affected by this problem, ZS 7.1.2 is not.
PHP formatter preferences (if it doesn't defined to use tabs for indentation instead of spaces) doesn't seems to have sense.
CSS/JS/XML/HTML/Text editors are not affected, but PHP editor does.

Re: ZS 9.0.x indentation problem

Posted: Tue Jul 17, 2012 5:45 am
by clarkphp
You're right. That is exactly what it's doing. I've used Studio 9 since it was in beta, and I've not noticed this until I saw your post and checked it out. I must not end up on the character positions you do when (un)indenting code blocks. How much heartburn is this causing you, in the one or so months since your post? I guess I'm always in column zero when I'm (un)indenting code.

Re: ZS 9.0.x indentation problem

Posted: Tue Jul 17, 2012 7:54 am
by flyingdr
clarkphp wrote:You're right. That is exactly what it's doing. I've used Studio 9 since it was in beta, and I've not noticed this until I saw your post and checked it out. I must not end up on the character positions you do when (un)indenting code blocks. How much heartburn is this causing you, in the one or so months since your post? I guess I'm always in column zero when I'm (un)indenting code.
Well, actually main reason for this problem to be raised is not indentation from first position instead of zero. Usually it causes visual inconsistency when you're trying to g.e. format PHPDoc or arrays, something like:

Code: Select all

/**
 * @param string $first     Description for first argument
 * @param boolean $second     Description for second argument
 */
Indentation of words "Descrption" will need to be adjusted manually using (back)spaces in this case, but in ZS 7 it was working properly.

Re: ZS 9.0.x indentation problem

Posted: Wed Jul 18, 2012 1:11 am
by dae51d
Related to this, un-shifting or trying to back my code up to the far left side so that I can re-shift/indent doesn't work. It's like it hits a certain point where a character touches the left wall, and then it won't move the other text any closer. It really sucks. It should KEEP moving the other text if you keep hitting SHIFT+TAB until there is no text left to unindent. Look at how Notepad++ (or most any other IDE for that matter) does it.

Re: ZS 9.0.x indentation problem

Posted: Fri Oct 05, 2012 4:39 pm
by folivier
This Shift-Tab problem is really a pain I must say.

As a programer, you deal with code all day long, and making the code organized (and indented) help a lot readability. I often use Shift+Tab to re-indent the code properly, and as soon as there's spaces in the way, or if one of the line as less tabs than they others, Shift+Tab does not work anymore. I use Gedit on Ubuntu to do that for me, while I feel Zend Studio should provide this feature out of the box.

For the people behind Zend Studio : you have a great product, but please keep in mind IDE is all about code, and code manipulation is of the upmost importance. I currently use Zend Studio 8, and I've refrained from upgrading to Zend Studio 9 BECAUSE of this detail alone. That how much it's annoying for me.

Thanks in advance for fixing it!