http://www.jedit.org/users-guide/modes.html
Edit Modes
An *edit mode* specifies syntax highlighting rules, auto indent behavior,
and various other customizations for editing a certain file type. This
section only covers using existing edit modes; information about writing
your own can be found in Part II, “Writing Edit
Modes”<http://www.jedit.org/users-guide/writing-modes-part.html>
.
When a file is opened, jEdit first checks the file name against a list of
known patterns. For example, files whose names end with .c are opened with
C mode, and files named Makefile are opened with Makefile mode. If a
suitable match based on file name cannot be found, jEdit checks the first
line of the file. For example, files whose first line is #!/bin/sh are
opened with shell script mode.
Mode Selection
File name and first line matching is done using glob patterns similar to
those used in Unix shells. Glob patterns associated with edit modes can be
changed in the *Editing* pane of the *Utilities*>*Global Options* dialog
box. Note that the glob patterns must match the file name or first line
exactly; so to match files whose first line contains begin, you must use a
first line glob of *begin*. See Appendix D, *Glob
Patterns*<http://www.jedit.org/users-guide/globs.html>for a
description of glob pattern syntax.
The default edit mode for files which do not match any pattern can be set
in the *Editing* pane as well.
The edit mode can be specified manually as well. The current buffer's edit
mode can be set on a one-time basis in the *Utilities*>*Buffer
Options*dialog box; see the
section called “The Buffer Options Dialog
Box”<http://www.jedit.org/users-guide/buffer-opts.html>.
To set a buffer's edit mode for future editing sessions, place the
following in one of the first or last 10 lines of the buffer, where *edit
mode* is the name of the desired edit mode:
2011/12/27 James <geniosity@...>
> Are they always the same? If so, edit the properties of the mode file and
> add those extensions to the list.
>
> Just a thought...
>
> 2011/12/25 My Php <myphplists@...>
>
>> I want to tell jedit formatting to treat unknown uSWindows file
>> extensions (.xyz, .bbbx) as if they were something else (.txt, .php,
>> .pl.....) . I can do this manually after the file is open. Can I
>> configure this?
>>
>> Thank you.
>>
>>
>> ------------------------------------------------------------------------------
>> Write once. Port to many.
>> Get the SDK and tools to simplify cross-platform app development. Create
>> new or port existing apps to sell to consumers worldwide. Explore the
>> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
>> http://p.sf.net/sfu/intel-appdev
>> --
>> -----------------------------------------------
>> jEdit Users' List
>> jEdit-users@...
>> https://lists.sourceforge.net/lists/listinfo/jedit-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> --
> -----------------------------------------------
> jEdit Users' List
> jEdit-users@...
> https://lists.sourceforge.net/lists/listinfo/jedit-users
>
>
|