Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Tab spacing
Tab spacing [message #85747] Fri, 05 December 2008 23:39 Go to next message
Shawn Clark is currently offline Shawn ClarkFriend
Messages: 70
Registered: July 2009
Member
Hi,

Not sure if this is a bug or functioning as designed but it is a pet
peeve with me so I thought I would ask. I have my tab spacing setup for
2 spaces with tabs inserted as spaces for PHP editing. In my HTML and
other editors I have it as 4 spaces with tabs inserted as spaces.
Reasoning is that the PHP code is following a standard that is for an OS
community so I don't want to change that.

The problem is that the PHP editor isn't handling the tabs properly in
some situations. For the most part it is great and will indent two
spaces when I select a number of lines and use the tab / shift+tab to
move things around. What is bothering me is that if I am on a new line
and I press tab the cursor will indent 4 spaces instead of the defined
two spaces.

An example would be if I was typing:

function my_test_function(){

Then I go to press enter and instead of it looking like:

function my_test_function(){
// cursor here
}

it ends up looking like:

function my_test_function(){
// cursor here
}

So then I have to backspace two of the four spaces. Now the odd thing is
that if the function was created as:

function my_test_function(){
}

and I put my cursor at the end of the opening brace and press enter then
it will put a new line that has the cursor indented two spaces instead
of the four.

So due to this and other inconsistencies with the PHP editor I find it
very frustrating to keep my code following the 2 spaces standard. Anyone
have any insight or should this be logged as a bug?

--
Shawn Clark
Re: Tab spacing [message #85763 is a reply to message #85747] Sat, 06 December 2008 10:49 Go to previous messageGo to next message
sNop is currently offline sNopFriend
Messages: 281
Registered: July 2009
Senior Member
Shawn Clark napsal(a):
> Hi,
>
> Not sure if this is a bug or functioning as designed but it is a pet
> peeve with me so I thought I would ask. I have my tab spacing setup for
> 2 spaces with tabs inserted as spaces for PHP editing. In my HTML and
> other editors I have it as 4 spaces with tabs inserted as spaces.
> Reasoning is that the PHP code is following a standard that is for an OS
> community so I don't want to change that.
>
> The problem is that the PHP editor isn't handling the tabs properly in
> some situations. For the most part it is great and will indent two
> spaces when I select a number of lines and use the tab / shift+tab to
> move things around. What is bothering me is that if I am on a new line
> and I press tab the cursor will indent 4 spaces instead of the defined
> two spaces.
>
> An example would be if I was typing:
>
> function my_test_function(){
>
> Then I go to press enter and instead of it looking like:
>
> function my_test_function(){
> // cursor here
> }
>
> it ends up looking like:
>
> function my_test_function(){
> // cursor here
> }
>
> So then I have to backspace two of the four spaces. Now the odd thing is
> that if the function was created as:
>
> function my_test_function(){
> }
>
> and I put my cursor at the end of the opening brace and press enter then
> it will put a new line that has the cursor indented two spaces instead
> of the four.
>
> So due to this and other inconsistencies with the PHP editor I find it
> very frustrating to keep my code following the 2 spaces standard. Anyone
> have any insight or should this be logged as a bug?
>

You are right and PDT in some cases uses setting from Generel - text editor and in other
cases from PHP - Fromater.

I thing this is a bug. Can you create ticket in the bugzilla ?
Re: Tab spacing [message #85793 is a reply to message #85763] Mon, 08 December 2008 18:10 Go to previous message
Shawn Clark is currently offline Shawn ClarkFriend
Messages: 70
Registered: July 2009
Member
sNop wrote:
> Shawn Clark napsal(a):
>> Hi,
>>
>> Not sure if this is a bug or functioning as designed but it is a pet
>> peeve with me so I thought I would ask. I have my tab spacing setup for
>> 2 spaces with tabs inserted as spaces for PHP editing. In my HTML and
>> other editors I have it as 4 spaces with tabs inserted as spaces.
>> Reasoning is that the PHP code is following a standard that is for an OS
>> community so I don't want to change that.
>>
>> The problem is that the PHP editor isn't handling the tabs properly in
>> some situations. For the most part it is great and will indent two
>> spaces when I select a number of lines and use the tab / shift+tab to
>> move things around. What is bothering me is that if I am on a new line
>> and I press tab the cursor will indent 4 spaces instead of the defined
>> two spaces.
>>
>> An example would be if I was typing:
>>
>> function my_test_function(){
>>
>> Then I go to press enter and instead of it looking like:
>>
>> function my_test_function(){
>> // cursor here
>> }
>>
>> it ends up looking like:
>>
>> function my_test_function(){
>> // cursor here
>> }
>>
>> So then I have to backspace two of the four spaces. Now the odd thing is
>> that if the function was created as:
>>
>> function my_test_function(){
>> }
>>
>> and I put my cursor at the end of the opening brace and press enter then
>> it will put a new line that has the cursor indented two spaces instead
>> of the four.
>>
>> So due to this and other inconsistencies with the PHP editor I find it
>> very frustrating to keep my code following the 2 spaces standard. Anyone
>> have any insight or should this be logged as a bug?
>>
>
> You are right and PDT in some cases uses setting from Generel - text editor and in other
> cases from PHP - Fromater.
>
> I thing this is a bug. Can you create ticket in the bugzilla ?

Bug submitted. #257959.

--
Shawn Clark
Previous Topic:Update site for the milestones PDT 2.0.0
Next Topic:How to set a project in existing source
Goto Forum:
  


Current Time: Thu Apr 18 04:58:25 GMT 2024

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

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

Back to the top