Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » If you copy & paste code, indentation is messed up
If you copy & paste code, indentation is messed up [message #1061551] Sun, 02 June 2013 15:10 Go to next message
Lucas Malor
Messages: 12
Registered: May 2013
Junior Member
Simple example; if you you copy & paste this code:

if ($a
    or $b)
{
    echo $a;
}


it will pasted as

if ($a
or $b)
{
    echo $a;
}


Note the indentation of "or $b". Of course this if statement doesn't need the newline, it's just an example.

I find this "feature" really annoying, is there not a way to disable it?

[Updated on: Wed, 05 June 2013 04:02]

Report message to a moderator

Re: If you copy & paste code, indentation is messed up [message #1061858 is a reply to message #1061551] Tue, 04 June 2013 07:56 Go to previous messageGo to next message
Lucas Malor
Messages: 12
Registered: May 2013
Junior Member
Okay... you have to go to
Preferences -> PHP -> Editor -> Typing
and deselect "Adjust indentation" under "When pasting". I also filed a bug about it. Thank you Lucas Malor. You're welcome Lucas Malor.

[Updated on: Tue, 04 June 2013 07:56]

Report message to a moderator

Re: If you copy & paste code, indentation is messed up [message #1069097 is a reply to message #1061858] Mon, 15 July 2013 02:50 Go to previous message
mariah sharp is currently offline mariah sharp
Messages: 17
Registered: July 2013
Junior Member
I have met this kind of question,too.I'll try this method
Previous Topic:How to Set UTF-8 as the Default Encoding for New Text Files in PDT 2.0 (Eclipse 3.4)?
Next Topic:New folders in PHP Explorer
Goto Forum:
  


Current Time: Mon Oct 07 06:24:32 EDT 2013

Powered by FUDForum. Page generated in 0.01504 seconds