Cᴛᴇ is a text editor for the Unix console, like nano and vi, but is better as there is no learning curve. It behaves like a modern application with mouse, menus and dialog boxes. This makes it like Linux Gedit, Kate, a web browser, Microsoft Notepad or Word. For example: To find some text one presses Ctrl-F and a dialog box appears.
cte is distributed as a single binary with no dependencies or the same in a .rpm or .deb package for 64 bit Intel Linux.
Due to cte being statically linked to glibc [libc] the following is provided to allow cte to be relinked with a different glibc. What are Gɴᴜ trying to achieve with this? cte will not have been tested against your new libc, there are 2,600 tests.
Run cte --relinkable and follow the instructions.
cte is very easy to use as it behaves like most popular applications. Some termainal emulators have incomplete support for complex key combinations, see below.
Under any termnial emulator cte functions fine, the mouse works, Alt- keys, used to access the menu and dialog box fields; and some of the more obscure key combinations such as Ctrl-Shift-End (select all text to the end of the document) are not always sent. The Escape key is slow in the terminal, so use Ctrl-Q to quit out of dialogs and menus. cte has the innovation of Ctrl-Up and Ctrl-Down to skipping five lines up or down respectively.
On Windows SecureCRT has the best support, followed by PuTTY. On Linux GNOME Terminal supports almost everything. The following are some notes to get the most out of cte on your terminal emulator:
As well as preserving the previous version of files as filename~, when started with the -V switch, or enabled through the menu, or editing a file already tracked by RCS cte will save using the local version control system RCS. For simplicity cte does not lock files, make the files read-only, nor store comments with each check-in. RCS stores it's revision histories in RCS/ subdirectory, beside the file being edited. Here are some tips for using this version control system:
Saving again in cte will save on the head, not create a new branch.
co -frevision filename
chmod +w filename
rcsdiff -rrevision filename
e.g.rcsdiff -rrevision -rother-revision filename
cte is built with the standard CUA/Windows/GNOME/KDE keys and supports VT-100, VT-220, xterm and Linux character sequences as transmitted by MobaXterm, SecureCRT, PuTTY, GNOME Terminal, Konsole and xterm so configuration should not be required.
Built on ncurses cte will function with any terminal emulation mode, as indicated by $TERM, e.g. vt100, and described by terminfo files (see man ncurses) for details.
On startup cte will read the configuration files
/etc/cterc and then ~/.cterc.
These files can define new actions for keys, e.g.
The action command is used to define what keys do. e.g.
The keys parameter, e.g. the "Shift-Up" in
The key command is used to give character sequences sent by the terminal emulator more meaningful names, so the configuration is easier to read and so the menus show meaningul names. e.g.
A control sequence is a space separated list of ASCII characters, ASCII names, numbers, Ctrl-, Alt-, XAlt- codes, or terminfo character sequence names. The easiest method to collect these is to press the key in cte, if the sequence is unrecognised a message will be shown at the top, listing the exact character sequence received, e.g. If you press Ctrl-Home and see "unknown sequence: Esc [ 1 ; 6 H", you should add:
Single characters may be referred to by literal character, e.g.
ASCII Name | Value | Control Character |
---|---|---|
Backspace | 8 | Ctrl-H |
Tab | 9 | Ctrl-I |
Enter | 13 | Ctrl-J |
Esc | 27 | Ctrl-[ |
Space | 32 | |
Del Delete | 127 |
Alt- sequences of any ASCII character, i.e. between Alt-! and Alt-~, and named ASCII chars, these are encoded as a Esc followed by the ASCII character:
terminfo key names, values are determined by the value of $TERM.
|
|
|
The following table lists the available actions and their default key combination you must press, e.g. Shift-Ctrl-Right. This is not the same as the character sequences for the keys, e.g. Shift-Ctrl-Right from xterm is Esc [ 1 ; 6 C. Availability depends on your terminal emulator. Many these are shown in the menu entries when cte is running.
|
|
$LANG should end in UTF-8, e.g. en_US.UTF-8. Your terminal should be configured to use UTF-8.
$TERM should identify your terminal, usually “xterm” or “xterm-256color”
cte has two major modes of terminal interaction, truecolor or not [ncurses]. If your terminal does not work try the other. cte --terminal-test is a good test of terminal support.
cte --color-test runs a test to see if your terminal supports truecolor, this is independent of the $TERM; if it works set $COLORTERM to “truecolor” to use truecolor mode, i.e: export COLORTERM=truecolor.
If you are seeing e.g: unknown sequence Esc [ o 6, you can configure cte to recognise these, see Configuration Files.
Cᴛᴇ is an initialism that stands for Cᴜᴀ Tᴜɪ Editor, Cᴜᴀ and Tᴜɪ themselves expand so Cᴛᴇ means: Common User Access Text User Interface Editor.