Desktop Tools and Development Environment |
Language Preferences for the Editor/Debugger
Select File -> Preferences -> Editor/Debugger -> Language to specify preferences, such as syntax highlighting, for the type of file you are editing. Language preferences apply based on the current filename extension. To specify language preferences, first select the Language. The preference dialog box displays the preferences for that language. Make changes to preferences for that language and click Apply.
As an example, when you edit a file with an .html
extension, the language preferences for HTML apply to that file. If you have a Java file open at the same time, the Java language preferences apply to the Java file.
File Extensions
To use the language preferences, the filename you edit must have one of the extensions in the File extensions list. Use the Add and Remove buttons to change the extensions associated with the selected language. Below are the default file extensions for each language. If a file has no extension (for example, a new untitled file), an M-file is assumed. For an extension other than those listed here, there is no syntax highlighting. Changes you make to the file extensions do not apply to currently open files, so close files and open them again.
Language Preference |
Default File Extensions |
---|---|
M (MATLAB M-file) |
.m , .cdr (uppercase or lowercase) |
C/C++ |
.c , .cpp , .h , .hpp |
Java |
.java |
HTML |
.html , .htm , .shtml |
For details about preferences for each language, see
See Also
Keyboard and Indenting Preferences for the Editor/Debugger | M Language Preferences |
© 1994-2005 The MathWorks, Inc.