Quick reference guide Scientific Linux for DESY

Previous Contents Index Next 

10. Text editors and browsers

aspell [options] command f
Interactive spell checker. The most basic usage is to check a file using
aspell [--lang=code] [--encoding=enc] -c file
or to list misspelled words in a file using
cat file | aspell [--lang=code] [ --encoding=enc ] -l
where code is a two letter abbreviation (de, en, fr, ...) for the language and enc is an encoding such as iso8859-15, koi8-r, utf-8. If option -a is given aspell behaves roughly as the obsolete ispell
 
emacs [-nw] [options] [file[s]]
The GNU project Emacs editor. The most useful options are:
-nw do start up emacs in ASCII mode in a terminal window
+n go to line n in the file to be edited
-q do not load an .emacs init file
 
hunspell [options] [file[s]] f
Interactive spelling checking. This is a replacement for aspell on SL6. The most basic usage is to check a file using
hunspell [-d code] [-i=enc] -c file
where code is a language code such as de_DE and enc is an encoding, e.g. utf-8.
 
less [options] [file[s]] FM
Text browser similar to more. Its functionality can be enhanced by a different lesspipe.sh, which can be selected by ini less (Ztn only). This way the files are preprocessed by lesspipe.sh to allow browsing of compressed files, tar files, man pages and many other formats. That makes it possible to e.g view files in archives using the notation less archive:contained_file. Some useful options are:
- display help information
-e exit if EOF is hit 2nd time (now default, change with -+e)
-i ignore case in searches
-n suppresses line numbers (useful for very large files)
-S chop long lines
+/pattern start at first occurrence of pattern
+n goto line n (+G to EOF, +n
to a position n percent into file)
\Yi{more [options] [file[s]?]}{F} Browse through a text file. Use less for enhanced functionality.
 
nedit [options] [file[s]] P
Motif GUI style text editor. Use e.g. nedit -h to get a short usage text.  
pico [options] [file] P
Simple text editor in the style of the alpine composer. Commands are displayed at the bottom of the screen, and context sensitive help is provided. Option -w disables word wrap and thus allows editing of long lines. Documentation
vi [options] [file[s]]
Screen-oriented (visual) display editor. See also the more capable vim below. Depending on the installation vi may or may not be identical to vim. Some useful options are:
+[n] go to line n (or to the last line) in the file to be edited
+/pattern start at first occurrence of pattern
-r file recover from crashed editing sessions
-R readonly mode
 
vim [options] [file[s]]
gvim [options] [file[s]]  
vi improved, a programmers text editor. Lots of enhancements above vi like multi level undo, multi windows and buffers, command line editing, filename completion, on-line help, visual selection, etc. Some useful options are:
+[n] go to line n (or to the last line) in the file to be edited
+/pattern start at first occurrence of pattern
-b binary mode to help editing binary files (see also xxd below)
-g start the GUI version of vim. Equivalent to gvim
-r [file] recover from crashed editing sessions
-u file load an alternate init file
-v readonly mode
 
xxd [-br] [-l len] [infile [outfile]] F
Dump files in hexadecimal or do the reverse. To edit a binary file relatively safely first convert it using xxd, edit in the output and then reverting the dump using option -r. Output may be restricted to len bytes or representation may change from hex to bits (-b).  

Previous Contents Index Next