# gnu_ww-tedit **Repository Path**: mirrors_gitGNU/gnu_ww-tedit ## Basic Information - **Project Name**: gnu_ww-tedit - **Description**: No description available - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-01-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README WW is a programmer's text editor. It features small memory and disk requirements, syntax highlighting, multiple simultaneous file editing, and more. It can be compiled for Linux / Unix (text console), and GUI emulated console for X and MS Windows. CONTENTS -------- * NEWS * How to build for Windows * How to build for Linux * How to build Doxygen documentation * Tips for using WW on a text terminal * TODO NEWS for last 3 builds ---------------------- --- version 0.2.3 build TO BE 51 --- + using git for version control + new disp module, new API, completely reimplemented + use doxygen for code documentation + new keybindings for text terminals, improved ergonomics . [bug #11532] bad autoindent . [bug #17564] Typo in Edit -> Block menu (Lowecase) . [bug #13445] Linux/X: Reverse quote doesn't work + (on a branch) using scons for building and cross building + (on a branch) deb package --- version 0.2.3 build 50 --- [ 2006-02-14 ] . [bug #15293] option UseTabs has no effect when turned off . X GUI: window didn't show correct title + resize in X11 version, maximize, restore . [bug #15192] wglob.ini always created in the current directory --- version 0.2.3 build 49 --- [ 2006-01-01 ] . [bug #11337] Win32 GUI: window is resizable + resize in Win32 GUI . [bug #14871] Makefile: the build fails mysteriously if output directories don't exist . [bug #14870] Makefile: the X and console versions have the same name & directory . [bug #14869] The X version cannot be compiled with static libraries --- version 0.2.3 build 48 --- [ 2005-10-25 ] . [bug #13445] Linux/X: Reverse quote doesn't work + free type fonts (xft) in X . [bug #13250] Clipboard doesn't work in X . [bug #12067] fix tab/shift+tab in linux text console and other key bindings . [bug #12743] console version read_kbd craps out in the middle of ESC-seq . [bug #13484] search with options (-i, -b) doesn't work . [bug #13489] search beyond last occurence fails . [bug #13491] search with "-b" must jump on the previous if current pos matches . [bug #13508] on solaris xterm, backspace is unrecognized] . [bug #13517] another failing search + imroved kaydefs for xterm . [bug #12309] mark-to-end-of-word is incorrect . [bug #12311] CheckDocumentTypeSet() fails when plug-in activated . [bug #12196] user bookmarks navigations doesn't work + stricter heap validation on Windows . {crash} saving bookmarks to .ini file fails . [bug #12275] {crash} two copys of a file in memory and bookmarks . [bug #12745] when wglob.ini is edited, don't store global cfg How to build for Windows ------------------------ Open a cmd.exe prompt. To setup the command line envyronment, execute vcvars32.bat from msdev\bin. Create directoriy for the debug binaries, ww_guiemu_dbg. Make it current so that the source is in ../src. From there execute `cmake -G "NMake Makefiles" ..' This creates makefile for nmake. To build after that, only type `nmake'. How to build for Linux ---------------------- Create directoriy for the debug binaries, ww_ncurs_dbg. Make it current so that the source is in ../src. From there execute `cmake -G "Unix Makefiles" ..' This creates makefile for GNU make. To build after that, only type `make'. How to build Doxygen documentation ---------------------------------- `Doxyfile' is the configuration for Doxygen. Inside 'Doxyfile' search for `# *' to find all marked comment sections of the options that were changed from the default. To generate the documentation from within the top directory, so that src is a subdirectory of the current directory, execute: `doxygen' API documentation of the modules is generated in doxy/html. Tips for using WW in a text terminal ------------------------------------ When running WW in a text terminal most of the CUI key combinations are not working. For example, the arrow keys work everywhere but on many terminals the shift+arrow combination doesn't emit any distinctive key sequence rendering many editor functions unaccessible. Alternative set of key bindings can be used to invoke those unreachable functions. Frequently used editor functions are assigned to 'ctrl' combinations. ctrl+e -- enters text selection mode. The current cursor position is marked as one end of the selection and the arrow keys will extend the range by moving the position of the other end. After that any block manipulation operation will use the current selection and will also end the mode. For example, to copy text, start with ctrl+e, use arrows to select, and to copy press ctrl+c, this will put the text in the clipboard and at the same time end the selection mode. ctrl+d, e -- toggle column block mode ctrl+l -- find next. A substitute to F3 which doesn't work on some terminals. ctrl+d, l -- search backward. Substitute for shift+F3. ctrl+d, i -- incremental search mode ctrl+d, left -- previous word, substitute for ctrl+left-arrow ctrl+d, right -- next word, subsitute for ctrl+right-arrow ctrl+d, ctrl+left/right also works. This is convenient in to make cursor jump over a few words in the same direction -- the operation can be executed without releasing the `ctrl' key. ctrl+d, home -- top of file, substitute for ctrl+home ctrl+d, end -- bottom of file, subtitute for ctrl+end ctrl+b, b -- set/remove a bookmark ctrl+b, up -- go to previous bookmarks ctrl+b, down -- go to next bookmark (old:TODO:edit:some suggestions are still valid) There are different levels of limitations depending on the terminal emulation The best terminal emulation is xterm, it transmits most of the useful key combinations. Every other terminal is with varying degree of limitations. -- If Alt combinations doesn't work, use ESC to invoke menu, then two or three shortcut letter. For example search function is `Esc,s,u' -- Ctrl+tab doesn't work, use Ctrl+F6 to switch between the top two files -- To switch among other files use atl+0 or Alt+W -- If ctrl+F6 doesn't work, use the equivalent `Alt+W,2' -- Shift+arrors must work in xterm, if it doesn't then use F8 -- `Ctrl+K,b', `Ctrl+k,k' also works for selections -- Ctrl+Shift+F8 must work to switch to column blocks, if it doesn't then use `Ctrl+k,n' -- To indent blocks use Tab as usual, to unindent use Ctrl+k-u How to extend the table of terminal key sequences -------------------------------------------------------------------- The editor has quite complete set of key sequences already. But once in a while there is a terminal that emits sequences that are not in the ncurs_disp.c file. New entries can be easilly added to the s_keys[] table. First the actual sequence must be obtained. There is a convenient script, keys.pl, which can be downloaded from here: http://geocities.com/h2428/petar/bash_bind.htm Press the new keys while the script is running. For example, the discovery of what are the key sequences for `home' and `end' on putty will look like this: $ ./keys.pl press 'x' to exit \x1b\x5b\x31\x7e \x1b\x5b\x34\x7e restore console mode Now these two lines can be added to s_keys[]: {"\x1b\x5b\x31\x7e", KEY(0, kbHome)}, {"\x1b\x5b\x34\x7e", KEY(0, kbEnd)}, After a rebuild these `home' and `end' will work on putty. TODO ---- SHORT-TERM: * rename disp files: disp_common.c; disp_ncurs.c; disp_win_g.c; disp_ncurs_p.h; disp_win_g_p.h; * Use frame characters for unix terminals: ACS_ULCORNER, ACS_LLCORNER, etc. * handle resize signal for ncurses * remove most of VALIDATE_HEAP_PTR and VALIDATE_HEAP, which were put temporarely * highlight pairs of () and [] * ctrl+] : goto matching pair * ctrl+[ : goto to the { or current level - 1 * Indent/Unindent block should work even if block is hidden * in X Read fron from the .ini, like in the Windows GUI * in gui_scr and x_scr and elsewhere fix the buf[255] to be bigger/smarter! * ini2.c, when writing .ini files, check that no section is written if no changes were made on any of the options; this is necessary to permit for more than one editor to store .ini files on exit * when resizing the screen make the file status line show the width and the height of the file area, the format should be WxH instead of row:col * prepare native palette for text console in putty, redo the way palettes are maintained to permit italics and bolds for comments and highlights * add the thwrap multithread library * refactor display and keyboard into separate module (library) * EVENT_KEY is too big, move out from HandleFileViewEvents (fview.c) * establish min size (use MSG_SET_MIN_SIZE) IDEAS: * in the .ini file add section to permit the adding of new ESC sequences * Pressing twice will show the current func name tooltip if not currently visible on the screen * Think of highlighting TABS * Think of highlighting SPACES at the end of the lines * make ctrl+kz -- suspend (unix suspend), this when suspend is implemented * ini2.c -- merge histories of files and ed lines based on a time stamp, this will permit that upon exit multiple editor instances would not overwrite eachothers data blindly