Fix for SF bug #1008656: word delimiters ignored.
[nedit.git] / README
blob8ad732367c8b4f5edb27aecf4bdd32a8712584bb
1                     NEdit Version 5.5RC1, July 2004
3 $Id: README,v 1.42 2004/08/09 22:20:00 n8gray Exp $
6 NEdit is a multi-purpose text editor for the X Window System, which combines a
7 standard, easy to use, graphical user interface with the thorough functionality
8 and stability required by users who edit text eight hours a day.  It provides
9 intensive support for development in a wide variety of languages, text
10 processors, and other tools, but at the same time can be used productively by
11 just about anyone who needs to edit text.
14 As of version 5.1, NEdit may be freely distributed under the terms of the GNU
15 General Public License:
17 This program is free software; you can redistribute it and/or modify it under
18 the terms of the GNU General Public License as published by the Free Software
19 Foundation; either version 2 of the License, or (at your option) any later
20 version.
22 In addition, as a special exception to the GNU GPL, the copyright holders give
23 permission to link the code of this program with the Motif and Open Motif
24 libraries (or with modified versions of these that use the same license), and
25 distribute linked combinations including the two. You must obey the GNU General
26 Public License in all respects for all of the code used other than linking with
27 Motif/Open Motif. If you modify this file, you may extend this exception to your
28 version of the file, but you are not obligated to do so. If you do not wish to
29 do so, delete this exception statement from your version.
31 This program is distributed in the hope that it will be useful, but WITHOUT ANY
32 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
33 PARTICULAR PURPOSE. See the GNU General Public License for more details.
35 You should have received a copy of the GNU General Public License in the file
36 COPYRIGHT as part of this distribution; if not, write to the Free Software
37 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
40 NEdit sources, executables, additional documentation, and contributed software
41 are available from the NEdit web site at http://nedit.org.
44 AUTHORS
46 NEdit was written by Mark Edel, Joy Kyriakopulos, Christopher Conrad,
47 Jim Clark, Arnulfo Zepeda-Navratil, Suresh Ravoor, Tony Balinski, Max
48 Vohlken, Yunliang Yu, Donna Reid, Arne Førlie, Eddy De Greef, Steve
49 LoBasso, Alexander Mai, Scott Tringali, Thorsten Haude, Steve Haehn,
50 Andrew Hood, Nathaniel Gray, and TK Soh.
52 The regular expression matching routines used in NEdit are adapted (with
53 permission) from original code written by Henry Spencer at the University of
54 Toronto.
56 The Microline widgets are inherited from the Mozilla project.
58 Syntax highlighting patterns and smart indent macros were contributed
59 by: Simon T. MacDonald,  Maurice Leysens, Matt Majka, Alfred Smeenk,
60 Alain Fargues, Christopher Conrad, Scott Markinson, Konrad Bernloehr,
61 Ivan Herman, Patrice Venant, Christian Denat, Philippe Couton, Max Vohlken, 
62 Markus Schwarzenberg, Himanshu Gohel, Steven C. Kapp, Michael Turomsha, 
63 John Fieber, Chris Ross, Nathaniel Gray, Joachim Lous, Mike Duigou, 
64 Seak Teng-Fong, Joor Loohuis, Mark Jones, and Niek van den Berg.
67 VERSION 5.5RC1
69 Version 5.5 offers one major new feature along with a few others:
71   - Tabbed Windows  (How long has this been on the wish list?  :-)
72   - A menu item for enabling auto-scrolling
73   - Find and Clear buttons for the interactive search bar
74   - Improved Latex & Python syntax highlighting patterns
75   - Superuser receives a warning when trying to overwrite a read-only file
76   - Various bug fixes and performance improvements
78 See the ReleaseNotes file for a more detailed description of these new features
79 and a list of bugs fixed in this version.
81 KNOWN DEFECTS
83   - Dialog boxes with buttons labeled "OK" have erroneous mnemonics.  This has
84     been corrected for 5.5RC2.
85   - The README file included with the 5.5RC1 distribution was not updated for
86     5.5RC1.  This file is the correct README for 5.5RC1.
88 BUILDING NEDIT
90 Pre-built executables will be available for many operating systems, including
91 most major Unix and VMS systems. Check out the NEdit web page at
93   http://nedit.org
96 The requirements to build NEdit from the sources are: 
98  - ANSI C89 system (compiler, headers, libraries)
99  - make utility (eg, GNU make)
100  - X11R5 development stuff (headers, libraries), or newer
101  - Motif 1.2 or above (Motif 1.1 might work, but is no longer supported)
102    This GUI library is a standard part on most systems which have an
103    X11 installation. Most commercial Unix systems feature this, others may
104    require a separate installation. 
105    A "free" (LGPL'ed) alternative to Motif, called LessTif, is available.
106    See the LessTif section under PLATFORM SPECIFIC ISSUES for details.
108 Optionally one may use:
110  - yacc (or GNU bison)
113 The two directories called 'source' and 'util' contain the sources for NEdit.
114 'util' should be built first, followed by 'source'. The makefile in NEdit's
115 root directory can be used to build both in sequence if your system is one of
116 the supported machines and no modifications are necessary to the makefiles. To
117 build NEdit from the root directory, issue the command: 'make <machine-type>';
118 where <machine-type> is one of suffixes of a makefile in the directory
119 'makefiles'. For example, to build the Silicon Graphics version, type:
121         make sgi
123 If everything works properly, this will produce two executables called
124 'nedit' and 'nc' in the directory called 'source'.
127 The Source Directories
129 Since executables are already available for the supported systems, you are
130 probably not just rebuilding an existing configuration, and need to know more
131 about how the directories are organized.
133 The util directory builds a library file called libNUtil.a, which is later
134 linked with the code in the source directory to create the nedit executable.
136 The makefiles in both source directories consist of two parts, a machine
137 dependent part and a machine independent part. The machine dependent makefiles
138 can be found in the directory called 'makefiles', and contain machine specific
139 header information. They invoke a common machine independent part called
140 Makefile.common (which in turn includes also Makefile.dependencies).
141 To compile the files in either of these directories, copy or link one of the
142 system-specific makefiles from the directory 'makefiles' into the directory,
143 and issue the command:
145     make -f Makefile.<machine-type>
146     
147 (where <machine-type> is the makefile suffix).  Alternatively, you can
148 name the file 'Makefile' and simply type "make".
150 If no makefile exists for your system, you should start from Makefile.generic,
151 which is extensively commented. Contact the developer at develop@nedit.org for
152 help.
155 Building NEdit on VMS Systems
157 Command files are provided for compiling and linking files in the source
158 and util directories.  comutil.com compiles the files in the util directory
159 and produces two library files, vmsutils.olb and libutil.olb.  comnedit.com
160 compiles and links the files in the source directory to produce the nedit.exe
161 executable.
164 Additional Settings
166 Some C preprocessor macros may be used to en/disable certain parts
167 of the code. Usually this correponds to some non-important features
168 being selected or certain workarounds for platform-specifc problems.
169 Those which might be useful on more than one platform are documented
170 in makefiles/Makefile.generic.
172 Note that a special compilation flag, namely REPLACE_SCOPE, is currently
173 available. Its purpose is to allow the evaluation of two alternative
174 (but functionally equivalent) Replace/Find dialog box layouts. 
175 By default, NEdit is built with a Replace/Find dialog containing 2 rows
176 of push buttons. Compiling with the REPLACE_SCOPE flag enables an 
177 alternative layout with a row of radio buttons for selecting the scope of 
178 the replace operations. Eventually, one of these alternatives will
179 probably disappear, but up to now, the NEdit developers have not been able
180 to decide which one to drop. Please give them both a try and let us know 
181 which one you prefer (via the discuss mailing list, for instance).
183 Another compilation flag, HAVE__XMVERSIONSTRING, adds additional
184 information about the Motif version in the menu item "Help->Version" or
185 the command line option "-version". Whether this is available on your
186 system depends on the Motif implementation. It is known to work with
187 OpenMotif 2.1.30, and Motif on Solaris 2.6 and AIX 4.3.3.
189 INSTALLATION
191 NEdit consists of a single, stand-alone executable file which does not require
192 any special installation.  To install NEdit on Unix systems, simply put the
193 nedit executable in your path.  
194 On VMS systems, nedit must be defined as a foreign command so that it can
195 process command line arguments. For example, if nedit.exe were in the
196 directory mydir on the disk called mydev, adding the following line to your
197 login.com file would define the nedit command:
199         $ ned*it :== $mydev:[mydir]nedit.exe
201 To use NEdit in client/server mode, you also need the nedit client program, nc,
202 which, again, needs no special installation, except in the VMS case, as above.
203 On some systems, the name nc may conflict with an existing program.  In that
204 case, choose a different name for the executable and simply rename it.  The
205 recommend alternative is 'ncl'.
206 Don't forget to put the man-pages for nedit and nc into a place where your
207 man command is able to find them (e.g. /usr/man/man1/nedit.1)
210 RUNNING NEDIT
212 To run NEdit, simply type 'nedit', optionally followed by the name of a file
213 or files to edit. On-line help is available from the pulldown menu on the far
214 right of the menu bar. For more information on the syntax of the nedit command
215 line, look under the heading of "NEdit Command Line".
217 The recommended way to use NEdit, though, is in client/server mode, invoked by
218 the nc executable. It allows you to edit multiple files within the same
219 instance of NEdit (but still in multiple windows). This saves memory (only one
220 process keeps running), and enables additional functionality (such as find &
221 replace accross multiple windows). See "Server Mode and nc" in the help menu
222 for more information.
224 If you are accessing a host Unix system from a remote workstation or X
225 terminal, you need to set the Unix environment variable for your display:
226 csh:
227         % setenv DISPLAY devicename:0
228 sh, ksh, bash, zsh:
229         % export DISPLAY=devicename:0
231 where devicename is the network node name (hostname) of the workstation or X
232 terminal where you are typing.
233 On VMS systems, the equivalent command is:
235         $ set display/create/node=devicename
239 PLATFORM SPECIFIC ISSUES
241 Systems with LessTif, rather than Motif libraries
243 As of Lesstif 0.93.18, NEdit is very stable with Lesstif. 
244 You can get the latest LessTif version from http://www.lesstif.org.
245 If you are having trouble building or running NEdit with LessTif,
246 remember there are pre-compiled statically linked executables available
247 from our website.
248 Known bugs which might show off in NEdit linked with LessTif include:
250   1) Some dialogs which are intended to be modal (prevent other activity
251      while up) are not, and doing other actions while these dialogs are
252      up can cause trouble (.89.9+)
253      
254   2) Switching to continuous wrap mode, sometimes the horizontal scroll
255      remains partially drawn after the change, rather than disappearing
256      completely as it should. (.89.9+)
257   
258   3) Secondary selection operations are not yet supported in text fields.
260   4) Status bar is blank after usage of Incremental Search field
261      (0.93.18+-)
264 Linux Systems
266 Red Hat Linux, as of version 8.0, no longer automatically reads X resources out
267 of the ~/.Xdefaults file.  Instead, it reads a file named ~/.Xresources.  Any
268 customizations stored in ~/.Xdefaults will not be honored, for all X
269 applications.  To fix this, copy the resources into ~/.Xdefaults, or link the
270 files together.
272 The default key bindings for arrow keys in fvwm interfere with some of the
273 arrow key bindings in NEdit, particularly, Ctrl+Arrow and Alt+Arrow.  You
274 may want to re-bind them either in NEdit (see Customizing -> Key Binding
275 in the Help menu) or in fvwm in your .fvwmrc file.
277 Some older Linux distributions are missing the /usr/X11R6/lib/X11/XKeysymDB
278 file, which is necessary for running Motif programs.  When XKeysymDB is
279 missing, NEdit will spew screenfulls of messages about translation table syntax
280 errors, and many keys won't work.  You can obtain a copy of the XKeysymDB file
281 from the contrib sub-directory of the NEdit distribution directory.  
284 Mac OS X Systems
286 NEdit is an X Window application and thus requires an X Window server, such as 
287 Apple's X11.app or XFree86.org's XDarwin, to be running.
289 If you are building NEdit yourself, you will probably need to edit
290 makefiles/Makefile.macosx to select the correct version of Motif.  There are
291 comments in the makefile to help you do this correctly.  Note that the
292 developers use the OpenMotif 2.1.30 package available (at the time of writing)
293 at:  http://msg.ucsf.edu:8100/~eric/
296 SGI Systems
298 Beginning with IRIX 6.3, SGI is distributing a customized version of NEdit
299 along with their operating system releases.  Their installation uses an
300 app-defaults file (/usr/lib/X11/app-defaults/NEdit) which overrides the
301 default settings in any new nedit version that you install, and may result in
302 missing accelerator keys or cosmetic appearance glitches.  If you are
303 re-installing NEdit for the entire system, just remove the existing app-
304 defaults file.  If you want to run a newer copy individually, get a copy of
305 the app-defaults file for this version the contrib sub-directory of the
306 distribution directory for this version on ftp.nedit.org (/pub/<version>/
307 contrib/nedit.app-defaults), and install it in your home directory or set
308 the environment variables XAPPLRESDIR or XUSERFILESEARCHPATH to point
309 to a directory and install it there.  In all cases, the file should be
310 named simply 'NEdit'.
312 No additional installation or resource settings are necessary on IRIX systems
313 before 6.3
316 HP-UX Systems
318 If you are using HPVUE and have trouble setting colors, for example part
319 of the menu bar stubornly remains at whatever HPVUE's default is, try setting:
321    nedit*useColorObj: False
323    
324 IBM AIX Systems
326 Due to an optimizer bug in IBM's C compiler, the file, textDisp.c, must be
327 compiled without optimization on some AIX systems.
330 Solaris (SunOS 5.3 and beyond) Systems
332 The nedit_solaris executable may require the environment variable OPENWINHOME
333 to be set to the directory where Open Windows is installed.  If this is not set
334 properly, NEdit will spew screenfulls of messages about translation table
335 syntax errors.
337 Solaris 2.4 -- Add -DDONT_HAVE_GLOB to the CFLAGS line in Makefile.solaris.
339 Solaris 2.5 -- Solaris 2.5 systems were shipped with a bad shared Motif
340 library, in which the file selection dialog (Open, Save, Save As, Include,
341 etc.) shows long path names in the file list, but no horizontal scroll bar,
342 and no way to read the actual file names.  Depending on your system, the
343 patch is one of ID# 103461-07, # 102226-19, or # 103186-21.  It affects all
344 Motif based programs which use the library.  If you can't patch your system,
345 you might want to just try the nedit_sunos executable (from ftp.nedit.org
346 /pub/<version>), which is statically linked with a good Motif.  You can also
347 set the X resource: nedit.stdOpenDialog to True, which at least gives you a
348 text field where you can enter file names by hand.
350 Solaris 2.6 -- If you're experiencing performance problems (windows come up
351 slowly), the patch for Sun's shared Motif library is ID# 105284-04.  Installing
352 the patch alone will improve nedit's performance dramatically.  The patch also
353 enables a resource, *XmMenuReduceGrabs. Setting this to True will eliminate the
354 delay completely.
356 SunOS 4.x Systems
358 On some SunOS systems, NEdit will also complain about translation table syntax
359 errors.  This happens when Motif can't access the keysym database, usually
360 located in the file /usr/lib/X11/XKeysymDB.  If this file exists on your
361 system, but NEdit fails to locate it properly, you can set the environment
362 variable XKEYSYMDB to point to the file.  If you can't find the file, or if
363 some of the errors persist despite setting XKEYSYMDB, there is a XKeysymDB
364 which you can use to update or replace your /usr/lib/X11/XKeysymDB file
365 available in the contrib sub-directory of the NEdit distribution directory.
366 If you don't want to change your existing XKeysymDB file, make a local copy
367 and set XKEYSYMDB to point to it.
369 If you find that some of the labeled keys on your keyboard are not properly
370 bound to the corresponding action in NEdit, try the following:
372   1) Get a copy of motifbind.sun (for Sun standard keyboards), or
373      motifbind.sun_at (for Sun PC style keyboards) from the NEdit contrib
374      directory on ftp.nedit.org:/pub/<version>/contrib.
375   2) Copy it to a file called .motifbind in your home directory.
376   3) Shutdown and restart your X server.
379 COMPATIBILITY WITH PREVIOUS VERSIONS
381 Existing .nedit Files
383 As of version 5.1, NEdit employs a built-in upgrade mechanism which will
384 automatically detects .nedit files of older versions. In general, NEdit
385 will try to convert and insert entries to match the latest version.
386 However, in certain cases where the user has customized the default entries,
387 NEdit will leave them untouched (except for possible syntactic conversions).
388 As a result, the latest syntax highlighting patterns for certain languages may
389 not get activated, for instance, if the user has customized the entries. The
390 latest default patterns can always be activated through the
391 Preferences->Syntax Highlighting->Recognition Patterns menu, though.
393 Next, some version specific upgrading issues are listed. Note that 
394 non-incremental upgrading (eg., from 5.0 to 5.2) is supported too.
396 * Upgrading from 5.3 to 5.4
398   - Resource syntax
399   
400     Basic colors, like the text foreground and background, are now true
401     preferences.  A new dialog (Preferences > Default Settings > Colors) is
402     provided to change them, previously only changeable from X resources. 
403     Upon starting, NEdit will migrate any custom colors you have set from
404     the old X resources.  Most users will not need to do anything.
405     
406     However, if you used X resources to dynamically change the colors on
407     different invocations, you will need to use the new application-level
408     resources instead.  See the .nedit file for details.
409       
410     In 5.3, color resources needed to be qualified by "nedit*" in order to
411     prevent problems when the deepest color visual was not the default. 
412     This is no longer necessary, and the qualification may be removed.
413     
414   - New location of configuration files
415   
416     The default location and name of NEdit's resource files has been changed.
417     The most important change is the fact that they can now be stored in a
418     custom directory, defined by the NEDIT_HOME environment variable. If the
419     variable is not set, the directory defaults to ~/.nedit.
420     The files have been renamed as follows:
421     
422        ~/.nedit        -> $NEDIT_HOME/nedit.rc
423        ~/.neditmacro   -> $NEDIT_HOME/autoload.nm
424        ~/.neditdb      -> $NEDIT_HOME/nedit.history
425        
426     For backward compatibility reasons, NEdit continues to use the old 
427     convention when these files are already present. No attempt is made
428     to force the user to adopt the new convention. 
430     Users that would like to migrate to the new setup can do so manually 
431     by moving and renaming the files.
432     
433   - Changed regular expression word boundary semantics and its effect
434     on the syntax highlighting patterns.
435   
436     During the 5.4 development cycle, it was noted that the implementation 
437     of NEdit's regular expression word boundary matching was rather
438     unconventional. More in particular, the '<', '>', and '\B' patterns
439     interpreted the boundary between any two characters of which at least
440     one was not a word character as a word boundary. A striking effect of this
441     was that the boundary between two spaces was considered to be a word
442     boundary, which is obviously rather unintuitive. This has been corrected 
443     in 5.4: the boundary between two characters is a word boundary, only if
444     exactly one of them is a word character.
446     Several of the built-in syntax highlighting patterns (implicitly) relied 
447     on the old word boundary interpretation and they have been corrected too.
448     
449     However, if the user has customized some of these buggy built-in
450     highlighting patterns, the automatic upgrading routines will NOT upgrade
451     them in order not to loose any customizations. It is left up to the user
452     to correct his/her customized patterns manually (using the corrected 
453     built-in patterns as a guideline). 
455     The following is a list of all language modes and patterns that have been
456     corrected:
457     
458       Ada:         Based Numeric Literals
459       Awk:         Numeric constant
460       C++:         numeric constant
461       C:           numeric constant
462       CSS:         property, selector pseudo class
463       Java:        decimal const, case numeric const
464       JavaScript:  Numeric
465       Lex:         numeric constant, markers
466       Matlab:      Numeric const
467       NEdit Macro: Built-in Vars, Numeric Const
468       Pascal:      TP Numeric Values:
469       Perl:        dq string, sq string, bq string, subroutine call, 
470                    numerics, re match
471       PostScript:  Number, Operator1
472       Python:      Number
473       SQL:         data types, keywords2
474       Sh Ksh Bash: keywords, built ins 
475       Tcl:         Keywords
476       VHDL:        Numeric Literals
477       Verilog:     Reserved WordsA, Numeric Literals, Delay Word, 
478                    Pins Declaration
479       XML:         element declaration keyword
480       Yacc:        numeric constant, percent keyword, markers
482     So, if the user has customized the highlighting definitions for any of 
483     these language modes (not restricted to the listed patterns), (s)he is 
484     strongly advised to restore the default patterns in the syntax 
485     highlighting dialog and to re-apply his/her customizations.
486     
487     Moreover, it is advised to check any custom language modes for potential
488     boundary matching problems as described above.
490 * Upgrading from 5.2 to 5.3
492   There are no major changes in the format of the .nedit file for version
493   5.2. Users that have customized the X Resources syntax highlighting 
494   pattern may consider restoring the default patterns, as they resolve
495   a performance issue when editing the .nedit file itself, for instance.
496   
497 * Upgrading from 5.1 to 5.2
499   There are no major changes in the format of the .nedit file for version
500   5.2. NEdit will try to insert additional entries for the newly supported
501   language modes and syntax highlighting patterns (CSS, Regex, and XML) and
502   highlight styles (Pointer, Regex, Warning).
504   Moreover, the formerly boolean 'showMatching' option will silently be
505   converted to a tri-state value.
507   Users that have customized some of the syntax highlighting patterns may
508   consider restoring the default patterns, as many of them have been improved
509   considerably.
510   
511 * Upgrading from 5.0 to 5.1
512   
513   NEdit 5.1 makes significant changes to the syntax of regular expressions.
514   Mostly, these are upward compatible, but two changes; introducing the brace
515   operator, and changing the meaning of \0; are not. Brace characters must now
516   be escaped with backslash, and & must be used in place of \0 in
517   substitutions.
519   NEdit 5.1 employs a built-in upgrade mechanism which will automatically
520   detect pre-5.1 .nedit files and fix regular expressions which appear in
521   user-defined highlight patterns. The automatic upgrade mechanism, however,
522   can not fix regular expression problems within user-defined macros. If you
523   have a macro which is failing under NEdit 5.1, you will have to fix it by
524   hand.
525   
526 * Upgrading from pre-5.0
528   If you are upgrading from a pre-5.0 version of NEdit, there are significant
529   changes to the macro language, and you are best off simply editing out the
530   nedit.macroCommands section of your .nedit file, generating a new .nedit
531   file, and then re-introducing your user-written commands into the new file.
532   Most macros written for previous versions will function properly under the
533   new macro language. The most common problems with old macros is lack of a
534   terminating newline on the last line of the macro, and the addition of "<",
535   ">", and now "{" to the regular expression syntax. These characters must now
536   be escaped with \ (backslash). Also, if you have been using a font other
537   than the default for the text portion of your NEdit windows, be sure to
538   check the Preferences -> Default Settings -> Text Font dialog, and select
539   highlighting fonts which match your primary font in size. Matching in height
540   is desirable, but not essential, and sometimes impossible to achive on some
541   systems. When fonts don't match in height, turning on syntax highlighting
542   will cause the window size to change slightly. NEdit can handle unmatched
543   font sizes (width), but leaving them unmatched means sometimes columns and
544   indentation don't line up (as with proportional fonts).
546 FURTHER INFORMATION
548 More information is available in the file nedit.doc in this kit, from NEdit's
549 on-line help system, the man-pages and from the enclosed FAQ file. 
550 There is also a web page for NEdit at: http://nedit.org.  For discussion with
551 other NEdit users, or to receive notification of new releases you can
552 subscribe to one or more of the NEdit mailing lists, announce@nedit.org,
553 discuss@nedit.org or develop@nedit.org.  The NEdit on-line help has information
554 on subscribing under Help -> Mailing Lists.
557 REPORTING BUGS
560 The preferred way to report bugs is to submit an entry on our web-based
561 bug tracker at:
563   http://sourceforge.net/projects/nedit/
565 The NEdit developers subscribe to both discuss@nedit.org and develop@nedit.org,
566 either of which may be used for reporting bugs.  If you're not sure, or you
567 think the report might be of interest to the general NEdit user community,
568 send the report to discuss@nedit.org.  If it's something obvious and boring,
569 like we misspelled "anemometer" in the on-line help, send it to develop.  If
570 you don't want to subscribe to these lists, please add a note to your mail
571 about cc'ing you on responses.