HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Code formatting settings?

ddumontddumont ✭✭

What settings do you guys use for tabs/spaces and newlines?
It appears that my client (currently configured for another OS project) does not jive with your settings... as seen here: https://github.com/vanillaforums/Garden/pull/1295

There was an error rendering this rich post.

Best Answer

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓

    I'm guessing your ide forces Windows style newlines while ours either leave newlines the way they were or use unix style line-endings.

    I'd recommend hunting around for some sort of preserve newlines setting. Otherwise, unix newlines are usually more standard on anything but .NET projects.

Answers

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓

    I'm guessing your ide forces Windows style newlines while ours either leave newlines the way they were or use unix style line-endings.

    I'd recommend hunting around for some sort of preserve newlines setting. Otherwise, unix newlines are usually more standard on anything but .NET projects.

  • Ahh sorry i updated the ticket there but forgot to mention that I found the problem.

    The php integration in eclipse has a setting that I use for my projects that removes trailing whitespaces from lines. That was the issue. I turned it off so my next patches should be cleaner in the diff view

    There was an error rendering this rich post.

  • ToddTodd Chief Product Officer Vanilla Staff

    Eclipse huh? I always hear it's an amazing ide, but everytime I try and dive in it really seems like it's from planet purple pants. I feel like I just don't "get" it. Any pointers?

  • I love it and use it for like... everything.

    My plugin projects have ant built tasks that automatically create the zip files for deployment! :D
    There's a php plugin suite and everything would be perfect if you guys would use mercurial instead of git :) or if I tried to learn to use git properly...

    There was an error rendering this rich post.

  • ddumontddumont ✭✭
    edited January 2012

    There are definitely eclipse-isms to get used to... Once you do, you'll want to have its babies.

    Start here: http://www.eclipse.org/downloads/
    Pick your flavor, you probably want the web developer one. But you can install all the goodies that separate the versions after the fact anyway, so you could start with classic if you wanted.

    After you get it started, go to the help menu - Install Software... No idea what it is on a mac, I'm allergic.

    The PHP package is just a bit further down there, you'll want that too.
    They have git integration plugins as well.

    Anyway, after that you can make or set up new php projects in the php perspective (Window - Open Perspective...)

    image

    Let me know if you need help or get stuck on something.

    There was an error rendering this rich post.

  • @Todd leaving my comment like this, it appears to be a bug you may want to address, so I'll leave the example for you to investigate. The images work when the two messed up links are copied and pasted near the bottom of the post near the working one :)

    There was an error rendering this rich post.

  • hbfhbf wiki guy? MVP

    Todd said:
    Eclipse huh? I always hear it's an amazing ide, but everytime I try and dive in it really seems like it's from planet purple pants. I feel like I just don't "get" it. Any pointers?

    @todd
    I've used Eclipse for some Java projects, but like you, I didn't acclimate to weather on planet purple pants very well.

    I love Visual Studio and the whole .NET experience... All of my 'real world' projects are done inside that IDE... Of course I grew up on MS-DOS and the whole Microsoft Empire, so I just feel at home there.

    I haven't tried doing any php /vanilla work in VS, does it actually support php syntax? (I guess I'll just google that one)

    For better or for worse, I've been doing all of my 'nilla plugin and theme editing in Dreamweaver.... not sure if that's ridiculous or not...

  • ToddTodd Chief Product Officer Vanilla Staff

    @ddumont, the wonky formatting occurred because of your -> which tripped up the html purifier. It's one of those things that causes quirks sometimes, but we need it if we don't want xss.

    Thanks so much for your pimping of the eclipse. I certainly am happy with Netbeans, but have always wanted to give eclipse a serious shot. I know that there are some things I could do better with my workflow and I've heard that this is what eclipse is all about. Your ant example is a great idea too.

Sign In or Register to comment.