Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Don't trigger Formatter when clipboard does not contain line break
Don't trigger Formatter when clipboard does not contain line break [message #1863309] Thu, 25 January 2024 13:18 Go to next message
Ravenous Bugblatterbeast is currently offline Ravenous BugblatterbeastFriend
Messages: 25
Registered: April 2020
Junior Member
This problem is not limited to the PHP Develeopment Tools but PHP is where the problem occurs the most.

PHP has lots of unique grammar which probably can't all be covered by the rules of the formatter. Some of these lead to unwanted indentations. A very simple example that considers C/C++ as well is that the formatter doesn't seem to be configurable for newlines between function arguments.

The formatter seems to be triggered every time I paste something somewhere not within quotes. I would find it very convenient, if I'd be able to configure eclipse to NOT trigger the formatter when the content of the clipboard does not include a line break.

Is it possible to configure it that way?

Kind regards
Re: Don't trigger Formatter when clipboard does not contain line break [message #1863687 is a reply to message #1863309] Wed, 21 February 2024 10:43 Go to previous message
Setua Sutli is currently offline Setua SutliFriend
Messages: 4
Registered: November 2023
Junior Member
I understand your frustration with the PHP formatter in Eclipse automatically adjusting your code in a way that disrupts your intended formatting. While some unique PHP syntax might not be fully covered by the formatting rules, there are definitely ways to customize its behavior to better suit your needs.

Addressing Specific Issues:

Newlines between function arguments: You're absolutely right about the lack of configurability for newlines in function arguments. Unfortunately, this might be a limitation of the specific formatter you're using. Explore alternative formatters within Eclipse or consider custom coding style configurations that enforce your preferred approach.

Formatter triggering on pasted content: This behavior can be quite intrusive. Check the formatter settings for options related to "triggering" or "formatting on paste." Look for options like "only format on save" or "exclude clipboard content" to prevent unwanted formatting adjustments.
Previous Topic: Which tools enhance PHP projects?
Next Topic:How do I change the default Run Web Browser? (Mine opens an Application that isn't a Web Browser)
Goto Forum:
  


Current Time: Thu May 02 09:33:57 GMT 2024

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

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

Back to the top