Jump to content

Vile (text editor)

From Alfawiki
vile
Company typeSoftware
IndustryText editors
Founded1990
FounderPaul Fox
Key people
Thomas Dickey (maintainer since 1996)
Productsvile text editor (also known as xvile on X Window System and winvile on Microsoft Windows)

vile is a text editor that merges functionalities from both Emacs and vi, two editors often regarded as rivals. Its purpose is to unify the user communities of these traditionally competing tools.

The term vile is an acronym for "VI Like Emacs". Version 9.6 of vile is highlighted in Chapter 18 of the O'Reilly publication "Learning the vi and Vim Editors". An earlier release, version 8.0, is referenced in Chapter 12 of "Learning the vi Editor".

In different environments, the editor is identified as xvile when running under the X Window System and as winvile on Microsoft Windows platforms.

The original creator and maintainer of vile was Paul Fox. Since 1996, Thomas Dickey has overseen its development, having contributed significant code improvements before assuming full responsibility.

Learning to use vile

Unlike other vi derivatives such as elvis, nvi, and vim, which incorporate their extensions into the original vi documentation, vile’s manuals emphasize its distinctions from vi.

The available documentation includes:

  • Interactive online help (accessible via typing )
  • Dedicated files covering specialized topics like the macro language
  • Embedded documentation featuring command reference tables and dynamic windows displaying registers, mode indicators, and more

The design of vile integrates handcrafted code with data tables processed through a dedicated utility. These tables enable dynamic capabilities such as interactive command listings and automatic name completion, setting it apart from other vi variants where such information remains fixed.

Dynamic windows within vile refresh automatically to mirror changes—for instance, updates to buffer lists or mode settings happen without any user action.

Several features found in vile were introduced before becoming common in other vi-compatible editors. Examples include support for multiple windows, input from pipes, and sophisticated fence handling. While these innovations are documented in O'Reilly texts, comprehensive analyses tracing their adoption across vi and emacs derivatives are scarce.

Command completion

vile offers command completion for various elements including command identifiers, filenames, directories, and mode parameters.

Major modes

Expanding on vi’s mode system, vile provides three tiers: global, buffer, and window. Buffer modes pertain to the characteristics of buffer contents such as line-ending formats or read-only flags. Users can tailor vile by defining majormodes, which combine buffer mode configurations with file type recognition and incorporate specific syntax filters.

Syntax highlighting

To perform syntax highlighting, vile employs syntax filter programs that analyze buffer content. Initially implemented as external utilities, most filters are now integrated directly into the editor to improve efficiency and reliability. These filters are primarily developed using the lex (preferably flex) with some written in C to handle complex grammars like those of Perl and Ruby. Their operation involves:

  • Loading color schemes and video attribute information from external files into a hash table,
  • Parsing text according to lexical rules,
  • Associating lexical tokens with color attributes,
  • Producing a marked-up output file that vile consumes via pipes or function calls

vile applies markup overlays to regions defined by line and column positions within buffers. These annotations update automatically when the user pauses activity, triggering re-parsing of the affected text.

History

Development of vile has been ongoing since its inception in 1990.

See also

Further reading

External links