There is a very famous way to set the formatting of the IDE edtior. The option is called EditorConfig (http://editorconfig.org/) and consists of a file that is placed in the root directory of the project.
Many IDEs like Sublime, Visual Studio or IntelliJ support this format. I know that there are files in NetBeans, with which you can also set project specific formatting but I would be very helpful if NetBeans can also handle .editorconfig files to simplify the collaboration with team members who use other IDEs than NetBeans.
WordPress will be making an editorconfig publicly available that would help developers follow their coding standards http://core.trac.wordpress.org/ticket/26429. Would be great if NetBeans were on top of editorconfig as well!
First steps here, but a lot of work ahead to map each EditorConfig property to a NetBeans way of handling it:
any news about this?
The last update I read was this one from March 12, 2014: https://blogs.oracle.com/geertjan/entry/editorconfig_and_netbeans_ide_part1
There is also this video:
But I cannot find an installable plugin. If you are into NetBeans plugin development, then you can build the plugin from the sources provided here: https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/nb-editorconfig
i'm not a java developer so i don't know how to compile the plugin.
Maybe onyone can release this plugin on the portal?
(In reply to Mte90 from comment #5)
> i'm not a java developer so i don't know how to compile the plugin.
> Maybe onyone can release this plugin on the portal?
I don't think releasing it "officially" is the way to go now. Just a compiled version for dl from the repo/somewhere would be great for testing.
Compiling the plugin is very easy. Just open the source code (mentioned in the comments above) in NetBeans. Then you will have a NetBeans Plugin project. After that open the context menu of the project (with a right click on the project itself) and click on "Create NPM". You can install then the NBM file by clicking in "Tools" - "Plugins" - "Downloaded" - "Add Plugins". After that you point to the NBM file and it will be installed. You can then use the plugin like shown in this video: https://www.youtube.com/watch?v=DTv9gUvmd5U - But be aware that not all editorconfig properties are working right now. For me it was working with the "indent_size" but "end_of_line" for example wasn't taken.
As update the development now is on github and they release the packages https://github.com/welovecoding/editorconfig-netbeans
Please add editorconfig support to netbeans!
(In reply to banaan from comment #9)
> Please add editorconfig support to netbeans!
As you can see the post before, there is already a plugin. Download it and everything is fine. Or see this post here: https://blogs.oracle.com/geertjan/entry/editorconfig_and_netbeans_ide
(In reply to ChrisLE from comment #10)
> (In reply to banaan from comment #9)
> > Please add editorconfig support to netbeans!
> As you can see the post before, there is already a plugin. Download it and
> everything is fine. Or see this post here:
I've tried that plugin, doesn't work very well. If you save it re formats your code, and if your code doesn't happen to be complete at that moment (missing bracket or something) it messes everything up with that automatic reformat. see https://github.com/welovecoding/editorconfig-netbeans/issues/98.
In my opinion support should be built in. All major PHP frameworks now ship with an .editorconfig file.
Still, can't use EditorConfig in NetBeans? Really?!
Yes, actually there is that plugin that seems abandoned and with the bug mentioned few comments above that is blocking the use.
The missing support of editorconfig is one of the reason I am using different editors (like for the missing of phpcs configuration by project) and evaluating another editor.
I am the maintainer of https://github.com/welovecoding/editorconfig-netbeans and as you can see we have come a long way with the project. There are only a few issues with which we are struggling. Any help there is really appreciated!