VILE(1)
π VILE(1) β User commands π
okay bestie, sit down, hydrate, because we're about to talk about vile β which stands for VI Like Emacs β¨ and also goes by the aliases xvile, uxvile and lxvile. yes she has four names. main character behavior fr fr π
β¨ SYNOPSIS β¨
vile [@cmdfile] [+command] [-FhIiRVv] [-gNNN] [-kcryptkey] [-spattern]
[-ttag] [filename]...
πΈ DESCRIPTION πΈ
vile is a text editor, bestie. and real talk β this man page is fairly terse, so if you want the juicy lore, hit up the internal help, which you can get with the -h option or by using the :help command from inside vile itself. π
xvile is literally the same text editor, except built as an X-windows application β so: fully integrated mouse support, scrollbars, etc. it's giving β¨glow upβ¨.
uxvile is a wrapper around xvile which invokes the latter program with the correct locale environment required to use a unicode character set and the UXVile X resource class set. she's the friend who makes sure everyone's setup is correct before the party π«Ά.
lxvile is a wrapper around xvile which invokes the latter program with a font chosen to match the current locale environment. aesthetic AND functional, we love to see it π.
π¦ SPIRIT π¦
okay so here's the vibe check: vile retains the "finger-feel," if you will, of vi π while adding the multiple buffer and multiple window features of emacs and other editors. the way that it does BOTH? iconic.
but bestie, listen β it is definitely not a vi clone. some substantial stuff is missing, and the screen doesn't look quite the same. not everything made the cut, and that's just the truth ngl.
the things that you tend to type over and over? those probably work π . the things you do less frequently, like configuring a startup file? those are somewhat (or very, depending on how ambitious you are) different. yes, exactly, depending on your ambition level π.
but what matters most is that one's "muscle memory" does the right thing to the text in front of you, and that is what vile tries to do for vi users. no cap. periodt. π
π OPTIONS π
first things first: vile accumulates most options into two temporary buffers, [vileinit] and [vileopts] π.
- the former (
[vileinit]) is executed before reading the first file into a buffer. - the latter (
[vileopts]) is executed after reading the first file into a buffer.
each one is removed after executing β unless an error is detected. gotta clean up after yourself β¨
π COMMON OPTIONS π
-ccommandβvilewill begin the session on the first file invoking the given command. legal commands include many ex-style commands, vile-commands, etc., subject to shell quoting. this option is used most often with a line number or search pattern. for example:
vile -c123 filename
vile -c/pattern filename
they correspond to ex-style commands on the given file:
:123
:/pattern
these are the more verbose equivalents:
vile -c'123 goto-line' filename
vile -c'search-forward /pattern/' filename
you can use more than one command, e.g.,
vile -c'123' -c'10*goto-col' filename
to put the cursor on column 10 of line 123. the * (or :) separates the repeat count (used by goto-col) from the line- or range-specification used by line-oriented commands. slay π―
@cmdfileβvilewill run the specified file as its startup file, and will bypass any normal startup file (i.e..vilerc) or environment variable (i.e.$VILEINIT). this is added to[vileinit]. π-Dβ tellsvileto trace the results of macro execution into the hidden buffer[Trace]. snooping but make it β¨diagnosticβ¨ π-e|-Eβ invokesvilein "noview" mode β changes are permitted to any buffer while in this mode (see-v). π-Fβ will run the syntax filter that applies to each filename on the command-line, and write the attributed text to the standard output. π¨-hβ invokesvileon the helpfile. see-?for a short usage message. π-i|-Iβ tellsvileto usevileinit.rc(which is installed) as the initialization file. if you do not have a.vilerc,vilewill make a short one that sourcesvileinit.rc. this is added to[vileinit]. πΌ-k cryptkey|-K cryptkeyβ specifies an encryption/decryption key. see below for further discussion. this option applies only locally to the buffers named on the command-line, and is not added to[vileopts], since that is executed too late. π-Rβ invokesvilein "readonly" mode β no writes are permitted while in this mode. (this will also be true ifvileis invoked asview, or if "readonly" mode is set in the startup file.) π«βοΈ-s pattern|-S patternβ in the first file,vilewill execute an initial search for the given pattern. this is not the same as-c/patternsince that positions the cursor to the line matching the pattern. this option positions the cursor within the line. subtle but important bestie, iykyk π-t tagβvilewill edit the correct file and move the cursor to the location of the tag. this requires a tagsfile created with thectags(1)command. the option-Tis equivalent, and can be used when X11 option parsing eats the-t. π·οΈ-Uβ overrides the$system-crlfvariable, making new buffers start in dos mode. π»-uβ overrides the$system-crlfvariable, making new buffers start in nodos mode. π»-vβ invokesvilein "view" mode β no changes are permitted to any buffer while in this mode (see-e). π-Vβvilewill report its version number. π’-?β if an option is not recognized (or the special option?is given),vileprints a short usage message. normally that is sent to the standard output. the GUIwinviledisplays this information in a window. πͺ
π SCREENSIZE OPTIONS π
screensize can be set from the command line for certain configurations:
-25-43-50-60β on PC systems you may be able to set the initial screen resolution from the command line. π₯οΈ-80-132β on VMS systems you may be able to set the initial screen resolution from the command line. seevile.hlpfor details. π
π§ X11 OPTIONS π§
xvile-specific command-line options are detailed in the help file (see "Standard X command line arguments"). the standard ones (e.g., -display, -fn, -geometry, -name, etc.) are all supported. πβ¨
π OBSOLETE OPTIONS π
vile recognizes some options which duplicate the functionality of the POSIX -c option:
+commandβ this has the same effect as-ccommand. π΅-g NNN|-G NNNβ this has the same effect as-cNNN.vilewill begin the session on the first file jumping to the given line number NNN. π΅
okay so these are giving "still works but why" energy. they're here, they're recognized, and that's the whole story π
π INVOCATION π
vile will edit the files specified on the command line. if no files are specified, and standard input is not connected to a terminal, then vile will bring up a buffer containing the output of the pipe it is connected to, and will re-open /dev/tty for commands. π°
files (except for the first) are not actually read into buffers until "visited". all buffers are kept in memory: machines with not much memory or swap space may have trouble with this. π
bestie if your machine is running on fumes, this is your warning. everything lives in memory. everything. π§
πΈ STARTUP πΈ
if the @cmdfile option is given, then the file given as "cmdfile" will be run before any files are loaded. π
if no @ option appears, startup commands will be taken from:
- the user's
VILEINITvariable, if it is set, - from the file
.vilercin the current directory, if it exists, or - from
$HOME/.vilerc, as a last resort.
see the help file for examples of what sorts of things might go into these command files. π«Ά
π― COMMANDS π―
please refer to the help available within vile for vile-specific commands. (that document, however, assumes familiarity with vi.) π
short descriptions of each vile command may be obtained with the :describe-function and :describe-key commands. all commands may be listed with :show-commands. π
additional documentation on writing macros using the internal scripting language can be found in the file macros.doc, distributed with the vile source. π
π¦ RELATED PROGRAMS π¦
π xvile
vile may also be built and installed as xvile, in which case it behaves as a native X Windows application, with scrollbars, better mouse support, etc. π±οΈβ¨
the help file has more information on this in the section X Window System specifics.
π vile-manfilt
there is a program distributed with the vile source which is usually installed as vile-manfilt. it may be used in conjunction with vile or xvile (with the help of the macros in the file manpage.rc) to filter and view system manual pages. π
xvile will even (with your font set properly) display certain portions of the manual page text in bold or italics as appropriate. fancy!! π
see the help file section on Filtering "man" pages for details.
π¨ Syntax filters
likewise, there are several language filters, e.g., vile-c-filt for C, which can embolden, underline, or perform coloring on program source code. π
again, see the help file section on Syntax Coloring for more information.
π§° UTILITY SCRIPTS π§°
vile is not simply an interactive program. its macro language and use of environment variables lets it be useful in scripting. π€β¨
π vile-libdir-path
the syntax filters and vile-manfilt may not be installed where you would execute them in your PATH. the vile-libdir-path script looks in the usual places and prints an updated PATH variable which other scripts can use when executing these programs. π
π©· vile-pager
vile can be used as a pager (typical examples include more and less). this script uses vile-manfilt to preprocess a file which is piped to vile, adding markup which vile displays properly. π
unlike a typical pager, vile-pager handles multi-line color escape sequences, and multiple levels of overstrikes. but unlike a typical pager, vile-pager expects the pipe to be closed before it starts displaying. πͺ
so yeah, no streaming-as-it-arrives energy here. it waits for the whole pipe to close. patience, bestie π§
πΈ vile-to-html
vile's -F option makes it act like a smart interface to the collection of syntax filters. but its output uses vile's internal markup rather than standard escape sequences. vile's utilities include programs which translate that markup into different formats:
atr2ansiβ converts the markup to ANSI escape sequences. π¨atr2htmlβ converts the markup to HTML (with color). πatr2textβ converts the markup to plain text. π
the vile-to-html script uses atr2html to convert a text file into HTML using color. π
π ENCRYPTION π
Okay bestie, so there's this program called vile-crypt and it can encrypt and decrypt files using the exact same algorithm as microEmacs's internal crypt algorithm. It's built on public domain code written by Dana Hoggatt, and honestly? It's retired. vile doesn't use it anymore, it's just chilling there for compatibility reasons. Legacy queen behavior, we respect it. π
What vile actually uses now is the crypt(3) function for all its encryption/decryption needs, and that bad boy is available on most Unix systems. Why do we care? Because it means vile can read and write files compatibly with vi β which is the whole point. But not vim, bestie, because vim uses a different algorithm derived from info-zip. So if you're switching between the two expecting your encrypted files to just workβ¦ nope. π
You can set the editor's encryption/decryption key right on the command line with -k key. And the text you want encrypted? You can hand it over as filenames on the command line, or just pipe it in as standard input. Easy.
On systems that have a getpass() library routine, vile will prompt you for the encryption key if you didn't already give it on the command line. And here's a fun little detail for the linux girlies: getpass() on some systems (linux, looking at you π) isn't interruptible from the keyboard. So to work around that, entering a crypt-key password that ends in ^C will make the program quit. That's the escape hatch, periodt.
Want more tea on vile's encryption support? Check the help file β it even has a whole discussion of a collection of macros that interface with GNU's gpg package. gpg macros, iconic π
πΈ ENVIRONMENT VARIABLES πΈ
VILEINITβ editor initialization commands, in place of a startup file. These get copied into[vileinit]and then executed. β¨VILE_HELP_FILEβ overrides the name of the help file, which is normallyvile.hlp.VILE_LIBDIR_PATHβ augments$PATHwhen vile is out there searching for a filter program. π¦VILE_STARTUP_FILEβ overrides the name of the startup file, normally.vilerc(orvile.rcon non-UNIX systems).VILE_STARTUP_PATHβ overrides the search path for the startup and help files.
π SEE ALSO π
Your favorite vi document (yes, that one π), the file macros.doc, and the vile help page β which you can pull up with the -h option, or just read as the text file vile.hlp.
π«Ά DEBTS and CREDITS π«Ά
So, history lesson real quick: vile was originally built from a copy of microEmacs, so a huge debt of gratitude is owed to the developers of that program. And like, so many people have helped out with code and bug reports on vile over the years. Their names are named at the bottom of the help file β go look, they deserve it. π
π AUTHORS π
vile was created by Paul Fox, Tom Dickey, and Kevin Buettner. Legends, honestly.
π BUGS π
Okay so the "VI Like Emacs" joke? It isn't really funny. It only sounds that way. :-) That's a direct quote, I'm not even editorializing.
Any other suspicious behavior should be reported via the project mailing list, or via the web-based bug reporting system. Both of those live right here:
https://savannah.nongnu.org/projects/vile
And that's a wrap on the whole page, bestie π β this one came to you from VI-Like-Emacs, dated 2023-07-02, and it's VILE(1) if you need to cite your sources like the academic main character you are. Go forth and edit. πβ¨
π¦ where this page comes from
- alpine 3.24: vile-doc 9.8z_p2-r0 Β· GPL-2.0-only
- debian trixie: vile-common 9.8za-1
- epel 10: vile 9.8za-6.el10_1 Β· GPL-2.0-only
- epel 9: vile 9.8za-6.el9 Β· GPL-2.0-only
- fedora 43: vile 9.8za-7.fc43 Β· GPL-2.0-only
- fedora 44: vile 9.8zb-8.fc44 Β· GPL-2.0-only
- ubuntu noble: vile-common 9.8z-1build2
- ubuntu questing: vile-common 9.8za-1
- ubuntu resolute: vile-common 9.8za-1build1
- ubuntu stonking: vile-common 9.8za-1build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms