Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      Buffers and Files
         . . .
         Files
            Reading Files
            Read-Only Files
            Saving Files
            . . .
            File Name Case
         File Variables
            Directory-wide File Variables
            Vi/Vim File Variables
         Internet Support
            Secure Shell and SCP Support
            URL Syntax
         . . .

Previous   Up    Next
File Variables  Commands by Topic   Vi/Vim File Variables


Epsilon User's Manual and Reference > Commands by Topic > Buffers and Files > File Variables >

Directory-wide File Variables

You can put file variables in a special file named .epsilon_vars. Such settings apply to all files in its directory. In an .epsilon_vars file, lines starting with # are comments. It contains one or more sections. Within each section, settings in it appear one per line, with a setting name, a colon, and a value. Each section begins with a line that says which extensions or modes it affects:

# Special settings for this directory.
Extensions: .r*
mode: Perl

Modes: Perl|Python
tab-size: 3

Modes: C
tab-size: 5
indent-tabs-mode: nil

The Modes and Extensions lines use a file wildcard pattern. It can use | for alternation, ? to match a single character or * to match any number, or character ranges like [a-z]. Epsilon will apply the settings in the section that follows only if the original file's extension or mode matches the pattern. This example says that all files with an extension like .r or .rxx or .ram in that directory should use Perl mode, and sets the tab size to 3 for Perl or Python files, and 5 for C files, also turning off using Tab characters to indent.

Epsilon decides which sections to use before applying the settings, so an .rxx file forced to Perl mode by the above example file won't get a tab size of 3 unless you add a tab-size: 3 line to its Extensions section. Also note that "mode:" sets a file's mode; "Modes:" begins a section for a specific mode. File variables in an individual file take precedence over those in an .epsilon_vars file.



Previous   Up    Next
File Variables  Commands by Topic   Vi/Vim File Variables


Lugaru Copyright (C) 1984, 2012 Lugaru Software Ltd. All Rights Reserved.