# jEdit 2.6 User's Guide

Next, Prev

# Chapter 5. Edit Modes

An edit mode is an editor configuration customized to edit a specific type of file. Edit modes can specify syntax highlighting, auto indent and various other settings for editing a file type.

# Mode Selection

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 edited in C mode, and files named `Makefile` are edited in 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 edited in shell script mode.

If automatic mode selection is not appropriate, the edit mode can be specified manually. To set the current buffer's edit mode on a one-time basis, select the edit mode in the Utilities>Buffer Options dialog box. To have a buffer open with a specific edit mode every time, set the "mode" buffer-local property to the name of the desired edit mode by placing the following text in one of the first 10 lines of the buffer, where `edit mode` is the desired edit mode:

    :mode=edit mode:

Home
Prev: The jEdit Command Line
Next: Syntax Highlighting