Copy and paste in Eclipse adds window newlines at the end of each pasted line

后端 未结 1 1579
逝去的感伤
逝去的感伤 2021-02-04 11:21

I am using Eclipse (Version: Indigo Service Release 2) on Mac OS X (10.7) with PHP Development Tools and Aptana Studio 3 Plugin.

In Preferences > General > Workspace I h

1条回答
  •  被撕碎了的回忆
    2021-02-04 11:54

    I had exactly the same annoying problem. After some research and experimentation I think I found the source of the bug and a workaround.

    Observations on my set up (Eclipse 3.7.2, PDT 3.0.0, no aptana):

    • it only occurred for me in PHP files inside the delimiters.
    • it only occurred when pasting while the cursor is somewhere on a line with only whitespace. After pasting, all whitespace was removed.
    • When there was a non whitespace character on the line, it did not occur. When pasting in front of the non-whitespace character, the whitespace in front of the character was however removed.

    This behavior felt like an issue with automatic indentation handling, so I tried dis-/enabling indentation related options. Disabling the following option fixed it for me:

    PHP > Editor > Typing > When pasting adjust indentation

    good luck

    0 讨论(0)
提交回复
热议问题