This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Netbeans needs to support indentation settings based on file types. As of version 6.5 you can only set *global* indentation settings for tab size, spaces per indent, expand tabs to spaces. Different file types have different indentation conventions. For example (based on conventions I am currently using): Python: tab size: 4 spaces per indent: 4 expand tabs to spaces: true Ruby: tab size: 2 spaces per indent: 2 expand tabs to spaces: true PHP: tab size: 8 spaces per indent: 8 expand tabs to spaces: false C and C++: tab size: 8 spaces per indent: 8 expand tabs to spaces: false HTML: tab size: 2 spaces per indent: 2 expand tabs to spaces: true CSS: tab size: 4 spaces per indent: 4 expand tabs to spaces: true Javascript: tab size: 8 spaces per indent: 8 expand tabs to spaces: false Being able to customize indentation settings based on file types is the first thing I look for when trying out an IDE or text editor. Customizable text editors such as Vim and Emacs have this feature. If you open a Python file, the indentation settings for Python are used. If you open a PHP file the indentation settings for PHP are used. What would make this feature really useful is to also be able to save these settings on a per-project basis. Different projects might have different indentation conventions despite the fact that there is already a convention for the language that the project uses. Additionally, it would also be nice to be able to copy settings from another language. C and C++ indentation settings can be copied to Javascript indentation settings. Lastly, it would also be nice to be able to override editor settings altogether using Emacs or Vim style mode lines.
The language specific formatting setting are already implemented, if you don't have setting for language you're expecting, please file an issue against related module (e.g cnd, javascript, ...) Per project formatting setting are also implemented, see project properties
Ah, I see it. So this is a module-dependent thing. Is there no way to make this standardized? I see that CND module does it's own thing when it comes to formatting settings. Python module does not seem to have indentation settings yet. The best one I have seen is for Java which provides a "Override Global Options" check box and it would be nice if it was a standard for all module implementations, e.g. new programming language module automatically have this configuration option.
I would also like to see this support, especially for HTML and XML based content. Can modeline support be added allowing each file to contain the required tabstop etc? I work on a 4GL system where we have a rule that the author of the original program determines the tabstop, someone modifying that program must comply to their rules, we achieve this through VIM modelines.
(In reply to nabing from comment #2) > Ah, I see it. So this is a module-dependent thing. Is there no way to make > this standardized? Resolve a worksforme NB8.0.2 At Options|Editor|Formatting|Language there is a setting for "All languages", where you can set tab size,spaces per indent,expand tabs to spaces...