Skip to main content



      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 08:18 Go to next message
Eclipse UserFriend
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 05:43 Go to previous message
Eclipse UserFriend
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:Trying to "Run a simple HTTP Server locally to test your web pages"
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: Wed Jun 18 08:33:38 EDT 2025

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

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

Back to the top