ZS 9.0.x indentation problem

General discussion on Zend Studio

Moderator: natalia_b_zend

ZS 9.0.x indentation problem

Postby flyingdr on Fri May 25, 2012 3:41 pm

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.
flyingdr
 
Posts: 2
Joined: Fri May 25, 2012 3:23 pm

Re: ZS 9.0.x indentation problem

Postby clarkphp on Tue Jul 17, 2012 5:45 am

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.
User avatar
clarkphp
Zend Global Services
 
Posts: 28
Joined: Sat Jun 30, 2012 9:59 pm
Location: Tennessee, United States

Re: ZS 9.0.x indentation problem

Postby flyingdr on Tue Jul 17, 2012 7:54 am

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.
flyingdr
 
Posts: 2
Joined: Fri May 25, 2012 3:23 pm

Re: ZS 9.0.x indentation problem

Postby dae51d on Wed Jul 18, 2012 1:11 am

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.
dae51d
 
Posts: 49
Joined: Wed Aug 19, 2009 2:16 am

Re: ZS 9.0.x indentation problem

Postby folivier on Fri Oct 05, 2012 4:39 pm

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!
folivier
 
Posts: 1
Joined: Fri Oct 05, 2012 4:35 pm


Return to Zend Studio

Who is online

Users browsing this forum: No registered users and 2 guests