Patrick AMAR

Bioinfo group, LISN, Univ. Paris Saclay, UMR 9015 CNRS
Synthetic & Systems Biology group, Sys2diag UMR 9005 CNRS, ALCEDIAG

History

FLWiX is a keyboard (and to a lesser extent a mouse) oriented text editor. It works the same way under the three main operating systems: Linux, Mac OS X and Windows.

FLWiX the successor of the Unix / X Window System text editor WiX, it uses the FLTK graphical interface toolkit and is written in C++ (the original WiX text editor was written in C).

Download FLWiX

    Windows Version (April 7, 2024)
    Linux Version (April 7, 2024)
    Mac OSX (Intel, High Sierra) Version (April 7, 2024)
    Mac OSX (Intel, Catalina) Version (April 7, 2024)
    Mac OSX (ARM, Big Sur) Version (January 4, 2024)

Download dictionaries:

FLWiX Documentation

1. Overview
1.0. Quick start
To launch FLWiX from the command line, the easiest way is to type "flwx file-to-edit" (without the quotes). This will run the flwx daemon in the background, and open a window containing "file-to-edit".

If no file to edit is provided (or if it does not exist) an empty window will be opened.

From any FLWiX window, this on-line documentation can be displayed by typing esc-esc (hit the Escape key twice)

1.1. Anatomy of the editing window

Line numbers can be displayed on the left side of the window. This is controlled by a configuration option and/or using the command toggle-line-numbers bound by default to the key ^X^L.

On the bottom left side of the window, 6 icons show the current state of the editing window.
They can be used to alternate respectively between:

  1. (unmodified) or (modified) buffer or (read-only) buffer
  2. (ISOlatin1) or (Unicode) or (ASCII) character encoding
  3. (Unix) or (Windows/DOS) line transition convention
  4. (Auto wrap mode) automatic folding of the lines longer than the window width, or
    (Long line mode) no line folding
  5. without spell check or
    with spell checking using the main language (French for example) or
    using the alternate language (English for example).

    Dictionaries for six languages are provided with the FLWiX package:
    English , French , German , Italian , Portugese and Spanish .

  6. insertion mode (default) or replacement mode.

On the bottom right side of the window the name of the current editing mode is displayed. A left mouse button click pops the list of all the editing modes allowing the user to switch to another one. A right mouse button click pops the current mode wall-chart, the list of all the commands and their bindings in the current mode.

On the right side of the window, a scroll lift is permanently displayed (or automatically displayed, when the mouse pointer goes near the right side of the window). The size of the lift represents the visible part of the buffer, while its position represents the location of the window in the buffer. Configuration options control how the scroll lift is displayed and what colours are used.

The text editing cursor is displayed as a steady block containing the current character in reverse video. Standard characters are self-inserting in the buffer while the editing commands are called using combinations of special keys (Escape and Control mainly) or dedicated keys (arrows, PgUp, PgDown, ...).

Any portion of the edited text can be selected using mouse or keyboard commands. The selection is shown inside a polygon made of up to three rectangles. The selection background and border colours are controlled by configuration options.
   The selected text is stored into the PRIMARY_SELECTION (X cut buffer) on Linux and into the clipboard on MacOS X and Windows.

1.2. Command Keys

In the next sections of this manual command Keys will be used from time to time to show examples of commands. A key is a combination of one or more keyboard key, with or without modifiers (Shift or Ctrl). The syntax used to write a key is the same as used in the keytable: mode configuration switch:

A keyboard key can be any key, some have only a letter, a digit or a punctuation written on it, and some are function keys like arrows. The unified syntax used in FLWiX to specify a keyboard key (regardless the modifiers mentioned before) is: For example $$U means Shift+Up_arrow, ^$< means Ctrl+Home. FLWiX command keys are made of one key, or one prefix key followed by one key. The standard prefix keys are Escape, ^S and ^X, but others can be defined by the user in the configuration file.

1.3. Installation

It is all what is needed for the system installation!

When launched with the -daemon command line option, flwx is run as a server program that makes the different editing windows communicate (via clipboard, kill-stack, ...); It cannot be launched more than once per user.
Otherwise, flwx asks the server instance to edit files. If flwx detects that there is no server running, a new one is automatically launched.

The user configuration file, ~/.flwxrc, located in the user home directory, is automatically created the first time FLWiX is launched. This default configuration file sets the main, alternate and personal dictionaries to the names:

                ~/.fr_dict.gz,
                ~/.en_dict.gz,
                ~/.user_dict
respectively.

  Any of the six provided dictionaries can be used for the main and alternate languages. These dictionaries can be gzipped (the default for languages) or not (the default for the personal dictionary).

The Configuration file chapter shows how it can be modified to fit the user preferences.

1.4. Command line options

flwx can be started in server mode or in client mode. Each mode has its own options, but silently ignore those of the other mode.
  When first launched, flwx detects if there is a server instance of itself currently running. If not, flwx run as a server program that makes the editing windows communicate (via clipboard, kill-stack, ...); It cannot be launched in server mode more than once per user (unless with the -debug option).
  Otherwise, when a server instance is running already, flwx run in client mode and asks the server to edit files.

Synopsis:     flwx [options] [file-1 ... file-N]

Regardless the mode, the file-1 ... file-N files (they must appear after the last option) are loaded as tabs in one window.

Shared options
Some options are shared by the server and client modes:

Server mode options Client mode options

1.5. Mouse usage and dialog boxes

Although a text editor, and especially FLWiX, is a keyboard oriented software, many commands can also be triggered using the mouse. Even when it is obviously easier with the mouse, everything can be done using the keyboard only!

2. The configuration file
2.1 Overview

At startup, the flwx server try to load the user configuration file ~/.flwrc; If it cannot be found, a default one is written (if the access rights are granted). This file contains two classes of specifications:

  1. global parameters, that affects the look and behaviour of the editor in all the editing modes,
  2. mode definition, the name and parameters that define a new editing mode, either from scratch (implicitly from the Fundamental built-in or redefined mode) or explicitly derived from another already defined mode.

Of course, line comments can be placed anywhere in the file. A line comment is simply a line that begins with a # (sharp sign).

The global form of the startup file is something like this:

# first parameter block
global parameter block 1
global parameter block 2
# the famous Mode 1
mode 1 definition
mode 2 definition
global parameter block 3
# Another comment
mode 3 definition
To keep things clear and simple, it is possible to include a file (with the include directive). This directive cannot be used inside a mode definition, but can be nested (an included file can include an other one).

So we can for example put the global parameter block 2 and mode 1 definition into the file ~/.mode_1 and the configuration file become:

# first parameter block
global parameter block 1
# Mode 1 and parameter block 2 are stored in ~/.mode_1
include ~/.mode_1
mode 2 definition
global parameter block 3
# Another comment
mode 3 definition
Conditional expressions on built-in or system specific variables can be used to parametrise global and mode specifications. Let's see first the syntax of the if directive, the boolean expressions, and the variables they can use. The syntax is derived from the C language:
if (<boolean expression>) {
    statement
    statement
    statement
} else {
    statement
    statement
}

The if directive can be used at global level, as well as inside the definition of a mode, but NOT straddling a defmode directive. The else part can be omitted.

The predefined variables the boolean expressions operate on are:


There are also predefined constants: Of course the if / else directives can be nested.
        # --------------------------------------------------
        # On Windows
        if (OS == Windows) {
            Windows parameter block
        # With administrator privileges
            if (ADMIN) {
                more parameters when administrator on Windows
            }
        }
        # On Linux or MacOSX
        else {
            Linux or MacOSX parameter block
        }
        global parameter block 2
        # --------------------------------------------------
If the if (or else) clause contains only one statement the curly braces can be omitted:
        if (OS == Windows) switch = value

The formal grammar of the configuration language is:

            FLWXRC  ::= LINST
// statement list
            LINST   ::= INST
                    |   INST LINST
// single statement
            INST    ::= <param> '=' <value>     // outside a mode definition
                    |   <param> ':' <value>     // inside a mode definition
                    |   IF                      // everywhere
                    |   SET                     // outside a mode definition
                    |   DEFMODE                 // outside a mode definition
                    |   DEFCMD                  // outside a mode definition
                    |   INCLUDE                 // outside a mode definition
// variable assignation
            SET     ::= 'set' <name> '=' <value>
// contitional evaluation
            IF      ::= 'if' '(' BOOLEXP ')' BLOCK ELSE
// boolean expression
            BOOLEXP ::= VAR RELOP VAR
                    |   VAR
                    |   '!' BOOLEXP
                    |   '(' BOOLEXP ')'
                    |   BOOLEXP '||' BOOLEXP
                    |   BOOLEXP '&&' BOOLEXP
            RELOP   ::= '==' | '!=' | '<' | '<=' | '>' | '>='
            VAR     ::= <name> | <string> | <integer>
            BLOCK   ::= INST
                    |   '{' LINST '}'
            ELSE    ::= 'else' BLOCK
                    |   ø
// user command definition
            DEFCMD  ::= 'defcmd' <ident> '(' ')' '{' LCOMM '}'
            LCOMM   ::= COMM
                    |   COMM LCOMM
            COMM    ::= <ident> '(' ARG ')' ';'
            ARG     ::= <string> | <integer> | ø
// mode definition
            DEFMODE ::= 'defmode' <ident> INHRT '{' LINST '}'
            INHRT   ::= ':' <ident> | ø
// file inclusion
            INCLUDE ::= 'include' <filename>

2.2 Settings

   To ease the modifications of the default parameters, this help window displays both the documentation and the parameter settings for FLWiX: the dark red links are setting links that allow the user to pop up a dialog box in order to set or change the value of the associated parameter, modifying directly the configuration file.

The mode parameter preference links first pop a menu containing the name of the modes associated with the link parameter, and then the change value dialog box. This allows the user to specify for which mode the new value is to be set or changed.

For almost all the parameters, the new values are immediately taken into account. Only a few need a restart of the FLWiX server, using for instance, the restart-the-editor command, or by quitting it and then relaunch it. They are:


2.3 Global parameters 2.4 Mode specific parameters         Style specific options

Style regexpr  Style font          Style colour          Style submode
argument       argument_font       argument_colour       
block_comment  block_comment_font  block_comment_colour  block_comment_submode
                                   ccode_colour          
class          class_font          class_colour          
constant       constant_font       constant_colour       
cpp            cpp_font            cpp_colour            
               extension_font      extension_colour      
keyword        keyword_font        keyword_colour        
library        library_font        library_colour        
line_comment   line_comment_font   line_comment_colour   line_comment_submode
math                               math_colour           math_submode
quote          quote_font          quote_colour          
string         string_font         string_colour         string_submode
                                   switch_colour         switch_submode
               typedef_font        typedef_colour        
               value_font          value_colour          
                                   variable_colour       
verbatim       verbatim_font       verbatim_colour       verbatim_submode
2.4 Mode list

Fundamental      C                C++              CUDA
Objective-C++    Shell            C-Shell          Python
XML              Text             German           LaTex
Bibtex           Mail             Makefile         SED
HTML             FLWX             WallChart        Hsim            

3. Keyboard commands

For each command, its name is first displayed, then the list of the keys bound to it in the Fundamental mode, then, if this command is not bound in the Fundamental mode, the name of the first mode where the command is bound to these keys.
The documentation of the command is displayed on the next line.

3.1 Moves

3.2 Insertions / Deletions 3.3 Undo / Redo 3.4 Files 3.5 Search / Replace 3.6 Miscellaneous

 


Website designed & maintained by Patrick Amar (patrick DOT amar AT lri DOT fr) [ last: 24/04/2024] 2618  hits since 09/01/2020