开发者

How to disable Eclipse PDT auto-format code when pasting

开发者 https://www.devze.com 2023-03-17 14:22 出处:网络
I\'m using Eclipse Indigo 3.7.0 with PDT for PHP develpment. When I copy/paste some code, Eclipse automatically format it.

I'm using Eclipse Indigo 3.7.0 with PDT for PHP develpment. When I copy/paste some code, Eclipse automatically format it.

For example, copying this :

if ($distance > 50 && $distance  <= 100)    {$local_score = 8;}
if ($distance > 100 && $distance <= 200)    {$local_score = 6;}

Is pasted in this :

if ($distance &开发者_开发百科gt; 50 && $distance  <= 100)    {
    $local_score = 8;
}
if ($distance > 100 && $distance <= 200)    {
    $local_score = 6;
}

Any idea on how to disable this ? Best Regards.


It's really bad...
Try this.
Open workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.php.ui.prefs by your text editor.
Add "smartPaste=true".

(note that I'm not aware of side effect)


  • Go to Window / Preferences
  • Then select page Java / Editor / Typing
  • Then unselect checkbox "When pasting" / "Adjust indentation".
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号