How can I get word wrap to work in Eclipse PDT for PHP files?

Programming PHP in Eclipse PDT is predominately a joy: code completion, templates, method jumping, etc.

However, one thing that drives me crazy is that I can't get my lines in PHP files to word wrap so on long lines I'm typing out indefinitely to the right.

I click on Windows|Preferences and type in "wrap" and get:

  • Java | Code Style | Formatter
  • Java | Editor | Typing
  • Web and XML | CSS Files | Source

I've tried changing the "wrap automatically" that I found there and the "Line width" to 72 but they had no effect.

How can I get word wrap to work in Eclipse PDT for PHP files?

-------------Problems Reply------------

This has really been one of the most desired features in Eclipse. It's not just missing in PHP files-- it's missing in the IDE. Fortunately, from Google Summer of Code, we get this plug-in Eclipse Word-Wrap

To install it, add the following update site in Eclipse:

AhtiK Eclipse WordWrap 0.0.5 Update Site

It's a known enhancement request. Bug 35779

The plugin Eclipse Word-Wrap Plug-In by Florian Weßling works well in latest Eclispe PDT (3.0.2) for me.

Update links

Eclipse Indigo 3.7:

Eclipse Juno 4.2:


After the installation You could use context menu: Right click > Toggle Word Wrap

or Menu > Edit > Toggle Word Wrap

Category:php Views:2 Time:2008-09-18

Related post

  • How to configure line wrapping for imports in eclipse 2009-09-17

    The eclipse and checkstyle guys of you will surely now this problem: After organizing imports in eclipse with CTRL-SHIFT-o, each import will be on a separate line, without line-wraps. If you configured checkstyle to warn if you have lines greater tha

  • Wrapping JUnit Tests (in Eclipse) 2010-05-04

    All of my tests for my Groovy code look like this public void testButtons() { try { page.getButtons(); } catch (Exception e) { throw org.codehaus.groovy.runtime.StackTraceUtils.sanitize(e); } } because I need to sanitize any possible StackTrace that

  • Tips on debugging SWIG-wrapped C++ code in Eclipse? 2010-12-08

    I have a large body of C++ code that I've wrapped with SWIG and am calling it from Java. The C++ code makes liberal use of boost smart pointers. Some of my JUnit tests complete but then experience seg faults during cleanup. The stack trace indicates

  • Intellij IDEA: wrapping certain widget in a container in XML file 2012-04-16

    Is there such tool, like in eclipse in refactor menu? It generates container and wraps the selected text in it. --------------Solutions------------- Check the Surrounding Blocks of Code with Language Constructs help section.

  • How can I effectively debug C code that's wrapped with JNI in Eclipse? (Android Dev) 2011-01-30

    I've got a segfault but I have absolutely no idea how to locate it. Tips? --------------Solutions------------- You can get the location of the C function that caused the crash using the Android NDK Stacktrace Analyzer. The steps are on the wiki, but

  • Word wrap in Eclipse Java? 2010-12-31

    I already have word wrap for Eclipse PHP (How can I get word wrap to work in Eclipse PDT for PHP files?). What about Eclipse Java? Is there a similar tool to wrap Java code lines? --------------Solutions------------- I looked into this a while back..

  • Should I wrap all my c++ code in its own namespace? 2009-02-02

    I come from a c# background where everything has its own namespace, but this practice appears to be uncommon in the c++ world. Should I wrap my code in it's own namespace, the unnamed namespace, or no namespace? --------------Solutions------------- M

  • A simple cobol program needs to be recoded as a C++ program to read environment variables passed by wrapping security software 2009-04-10

    I have a COBOL exe program which calls a COBOL dll which in turn calls a COBOL program using a dos interrupt 'x91 - the calling program uses an 'x91' to activate an EXE file as if it were typed in as an operating system command line entry. The securi

  • When you write TeX source, how do you use your editor's word wrap? 2009-05-22

    Do you use "hard wrapping" (either yourself or automatically by your editor) by inserting newlines into your source document at a certain line length, or do you write your paragraphs in one continual line and let your editor "soft-wrap" for you? Also

  • Wrapping a web project in a solution file, and CVS 2009-08-31

    This could quite possibly be the dumbest question ever asked. Our client wants us to have a Solution file (one .sln and .suo) neatly put into 1 directory higher than the actual web project. And we don't even have a Web Project file, it's just a websi

  • Ruby: How do I selectively remove line wrapping from a text file? 2009-12-16

    I want to edit the following text so that every line begins with Dealer:. This means no wrapping/line breaks. For lines starting with System, wrapping is fine. What would a solution in ruby look like? Thanks This is located in a .txt file Dealer: 5 s

  • Does the Wrap function in ColdFusion insert CR/LFs? 2010-05-06

    I have the need to do some word wrapping with a few considerations: 1) Source file is MS WORD 2) Copy and paste the text into a textarea in a cfform. 3) Use #wrap(theTextVar,80)# to dump out the text 80 characters 4) The text is uploaded to a legacy

  • preventing "ld -wrap " circular references 2010-07-20

    I am using GNU ld's "-wrap" option to intercept calls in applications, but have ran into a scenario where the code implementing the wrapper indirectly calls the wrapped function, creating a circular reference. Example The goal is to wrap read calls t

  • Wrapping an existing EXE into an MSI - drawbacks? 2010-10-26

    We've got an EXE which works great for installing our application. However, we have multiple customers who are requesting an MSI for ease of deployment in their current domain. If we use our existing EXE install process, can we wrap that into an MSI

  • Jquery problem wrap/unwrap procedure 2011-07-31

    Consider the following code: $(".lcontainer a").click(function () { var current = $(this); var name = current.attr('href'); document.getElementsByName('source')[0].value = name; var fPicture = "css/imgs/Flash.png"; //If image is wrapped in link unwra

  • ms word 2007 macro to insert images and to perform text wrapping on multiple files.. 2014-02-17

    hi.. I am not a vba programmer. i want a macro so that, to place all the 250 docx files which contains text, in one folder, and 250 images in another folder, when i run a macro, all the text files should get text wrapping, to insert image behind text

  • Publisher 2010: Tried all the Wrap Text options, still nothing 2015-01-29

    I have a publisher file that has some images with text wrapped around them already in it. I copied those pages to make a new page and now I'm changing the text and layout. The text won't wrap around the images I'm putting in . I am not making a Web d

  • Wait until file is unlocked in .NET 2008-09-08

    What's the simplest way of blocking a thread until a file has been unlocked and is accessible for reading and renaming? For example, is there a WaitOnFile() somewhere in the .NET Framework? I have a service that uses a FileSystemWatcher to look for f

  • What's the best way to distribute Java applications? 2008-09-17

    Java is one of my programming languages of choice. I always run into the problem though of distributing my application to end-users. Giving a user a JAR is not always as user friendly as I would like and using Java WebStart requires that I maintain a

Copyright (C), All Rights Reserved.

processed in 0.069 (s). 11 q(s)