Home
Name Modified Size InfoDownloads / Week
older alpha versions 2011-03-19
fed-0.94a.tar.gz 2011-03-23 255.4 kB
README 2011-03-19 15.6 kB
Totals: 3 Items   271.0 kB 0
+-------------------------+
|      ___           _    | fed : a linux console editor
|     / __)         | |   |
|   _| |__ _____  __| |   | (c)2011 h. elwood gilliland iii
|  (_   __) ___ |/ _  |   |
|    | |  | ____( (_| |   |
|    |_|  |_____)\____|   |
|                         | dependencies: gcc, php
+-------------------------+


About
-----

fed was started as a simple replacement text editor for the quite popular
editor nano.  The project's founder worked with nano for years, but got sick
of poor syntax highlighting, and the lack of familiar editor commands.  He
used pico, before nano, and since nano hasn't changed much recently, he
decided to write his own.

Though "fed" is a text editor, it can also handle binary files.

fed is released under the New BSD License.  Stay fed!

Licensing Note: if you compile with the option -DNVADERS_IN_FED,
                the license changes to GPL


Known Issues
------------------------------------------------------------------------------

- Uses Memory not Disk/Cache

This editor uses a memory snapshot of a file, therefore there is a limit to
the number of files and loaded total bytes, operating bytes, etc.  It is not
as robust as file size increases.  Editing between 10 and 20 medium sized
source files should be issue-less, however larger files (greater than 100k
of ascii text on the system this was designed on) may show its limitations.

Tests and observations:
      - 500k source file loaded OK alongside other files, you could edit,
        but inserting a single character took a considerable delay.. this
        file was real code and about 13100 lines; way bigger than most!
        However, an un-highlighted file of a similar size was way faster.
      - 25 files loaded without issue, operated gingerly

- Eradicates Tabs *not a bug*

Use configuration options or command line to set the number of spaces
tabs are to be turned into.

- De-MSDOSifies *not a bug*

Munches all LFs .. this is a Unix-based editor!  No CRLF support.  It may
not eradicate them, but it will certainly ignore them and they may cause
visual glitches... -lf on the command line will eat them on load.

- Uses Temp Files *not a bug *

 .fedtemp, .fedout, .fedlog, .fedscript.php

- Relatively Low Lateral Testbed

So far we have only tested this editor via Tera Term and PuTTy, on Ubuntu,
and on Fedora (thanks to akimbo).

If you have experienced an issue and wish to report it,
please do so on the project page: http://sourceforge.net/projects/fed/

We may not be able to fix your problem if we do not have a similar setup.
Please report bugs to our project page and include all relevant information
in a complete and understandible way.

- Does not yet handle binary "hex editing" despite claim

Oh well.

- Does not yet really have a "free mode" 

Experiments in this mode revealed we have a lot to do before such a mode can be
fully implemented, so not included in this release.

- Will resizing the terminal sometimes crash the editor?

There was a big with this.  We think it is fixed.  Let us know if it is not.


Straight to Beta
------------------------------------------------------------------------------

After the first beta version of this tool, new releases will still occur, but
we are looking for a "caretaker" of this project.  We also encourage you to
submit changes, patches, updates, fixes and plug-ins.


fed's Features
------------------------------------------------------------------------------

Syntax Highlighting

Uses its own simple highlighting system to provide language definitions and
make code appear properly highlighted on the screen.  This feature can be 
suppressed with the command line option -lang

Multi-tabbed View

Load multiple files into the editor and switch between them.  If only one
file is loaded into fed, tabs are suppressed.

Deletion Buffer versus ClipBoard

A deletion buffer is not a clipboard, but a separate series of lines deleted
using the Kut (not Cut) command, a la nano with a slight improvement.
A clipboard is a place where the common PC commands "Cut, Paste, Copy" 
are used to manipulate selected areas. The editor fed also supports the
"grid selection" which is helpful for programming and using fed to edit
columnar data.

Unlike nano, the commands Ctrl-K and Ctrl-U allow you to collect multiple
segments and clear the buffer expressly by using Ctrl-X, which is normally
the regular Cut command, except in many cases it is mapped to "exit" in
fed's user interface.

Context Menu and Plug-ins

The context menu lets you pick a plug-in (written in PHP) to execute on a
selection, or the current word. See the "Plug-ins" section for more
information on this feature.

OOM and memory corruption failsafe

If something impacts fed, generating a SIGSEGV, fed will attempt to save
all loaded files with the .crashed extension.


.fed Configuration
------------------------------------------------------------------------------

Root Level (System-wide)

The root admin may place a .fed file at the location /etc/fed/.fed which is
readable by everyone, however a .fed in the user's home directory will append
any plug-ins and override the root's command line default.  If such a file
does not exist, fed will load with shipped plug-ins and the compiled default
configuration.

User Level

A .fed file in your home directory or in the fed /etc/ directory can add
a list of optional command line options that will be always set when it is
loaded.  You can override the root .fed config as a user by adding -root
to the beginning of your config file.

2 Plugin Folder Sources

A .fed file in your home directory may include 1 path to a folder containing
a file "index.txt" and a list of .php files paired with .txt files that
contain short descriptions of plugins (usually with a mention of what
they do briefly, and their dependencies, if any, 65 wide by 3 lines long).  

You can enable this on the command line by typing: +plugins=/home/dir/plugins

Syntax Highlighting Files

You can reroute fed's search for language descriptions by adding in the
config or on your command line: +lang=/home/dir/lang

A language folder contains a list of language filenames that are
in the same directory, preferably named <lang>.txt, where lang is the
extension of the source code file you are trying to load - for example,
c.txt for .c or js.txt for javascript files.  These files contain symbol
recognition tables that perform really basic code highlighting.  Someday
in the future some non-profit should finally solve the problem of C not
having a good clean implementation of this kind of encoding.  Who knows,
perhaps programming languages could be required to publish their
designer's preferred highlighting patterns one day.

No Configuration

Fed can operate without config files.  It assumes /etc/fed exists, however
and files must be read from /etc/fed/lang and /etc/fed/plugins if you wish
to use those features.

See the section "command line options" below for what you can configure.


Interface
------------------------------------------------------------------------------

The command set may not work properly on all machines and terminals.
Please report issues to our project page on SourceForge.

Commands are case-insensitive

Ctrl-Z  : Undo (up to 50 per file! warning: memory hog)
Ctrl-Y  : Redo

F1,Ctrl-/  : Help (x to exit, PageUp/PageDown, Arrows)
F2,Ctrl-L  : Load...
F3,Ctrl-S  : Save
F4,Ctrl-Q  : Close (and prompt to save)

Ctrl-I  : Insert file at cursor
Ctrl-E  : Export a copy as... (note: creates a new tab!)
Ctrl-N  : New file

Ctrl-F  : Find
Ctrl-R  : Find and Replace
Ctrl-G  : Goto line #

Ctrl-K  : Kut this line and append it to the deletion buffer (not clipboard)
Ctrl-U  : Paste a copy of the deletion buffer (not clipboard)

Ctrl-\  : Begin a grid selection
Ctrl-]  : End/clear/begin a selection, or select current word if none started

Ctrl-X  : Cut selection to clipboard
Ctrl-C  : Copy selection to clipboard
Ctrl-V  : Paste selection from clipboard

Ctrl-P  : "Ctrl-Minus" Go back one file tab (for multitabbed)
Ctrl-O  : "Ctrl-Equals" Go forward one file tab (for multitabbed)

Delete  : Delete selection (while selecting), or Backspace/Del
Insert  : Toggle insert mode
Page Key: Move up or down by one screen length
Arrows  : Move the cursor
Ctrl-B  : (Ctrl-Comma) "Free move" mode (moves beyond EOL)

Ctrl-D  : Execute Plugin
Ctrl-T  : Tab
Ctrl-W  : Show EOL/EOF in editor
Ctrl-B  : Beautify (mops up unnecessary spaces decreasing carbon footprint)

Ctrl-6 or F10 : Suspend process (like Ctrl-Z in other programs)

 F11 : Easter Egg
 F12 : "Free Move Mode" toggle

Unused keys for future: F5,F6,F7,F8,F9

Command Line Options
------------------------------------------------------------------------------

Usage: fed [options] [filename(s)...]

Where 'options' is one or more of:

--help         Displays this
-h             Displays this
-ruler         Suppresses the column ruler
+clock         Adds a clock
+old           Saves copy of the file(s) as name.old on load from command line
+plugins=path  Loads additional plugin folder (total of 1 extra path)
-plugins       Loads no plugins
+lang=path     Loads alternative language definition files
-lang          Suppresses language definition and syntax highlighting
-fed           Ignores .fed configuration files (both root and home)
-root          Ignores root .fed if it exists
+count         Fed will simply load and count the lines for each file, then exit
+b64           transforms fed into Bob Trower's b64 utility
+free          fed starts with "Free Move" mode on
+fedhome=path  Sets the path to fed's home (/usr/bin and /etc/fed as default)
+mintab=#      Number of spaces that mimic a \t (5 is default)
+lang=path     Changes to an alternative language folder

And 'filename(s)' is one or more:

<filename>     Loads the filename into a "tab"

If no files are provided, fed will create a 'new' file

Examples:

fed somefile.txt
fed /some/file/1.txt /some/file/2.txt
fed "somefile.txt"
fed *.c
fed

fed alone creates a new file named "new" in the cwd


Editor Layout
------------------------------------------------------------------------------

This section may look a little weird, but the goal is to show you what it will
look like to be using fed:

Example default screen 80x6:

[<yourfilename>][ anotherfile ][ fi... ] [ etc.. ] [ tab5 ]
0...5....A....E...|20...,....|30..,....|....,....|....,....|60..,..70|.........V
your text file
[: 
Line 123/783921             Col 44       [somefile.name]    BINARY     Modified 
Ctrl+ H:elp [,]:Sel X:Cut C:opy V:Paste F:ind Z:un O:log Y:re L:oad S:ave Q:uit

Above: A Column Ruler appears at the top of the view, and a Status Readout appears
at the bottom.  The current file you are editing appears in the Status Readout
(see below).  There is also the command prompt (lower left) and the cheat sheet
(bottom line).

Legend:

 - Column Ruler (top)

0...5....A....E...|20...,....|30..,....|....,....|....,....|60..,..70|.........V

Can be suppressed with the command line option -ruler

With the command line option +clock you may see this one:

0...5....A....E...|20...,....|30..,....|....,....|..12:52a.|60..,..70|.........V

 - Status Readout (bottom)

L 123/7831:44/80 [somefile.name] Ins Clipboard [#value]

First we see the file line and then the column of the current position, followed
by the filename in brackets, indicators about mode and clipboard use, then the
ncurses decimal value of the current character.




Plug-ins
------------------------------------------------------------------------------


Overview

Plug-ins come in two flavors: vetted and non-vetted.  A vetted plug-in is
included with the distribution, while a non-vetted plug-in is one you've
installed yourself, from some source, that hasn't been vetted.

To have your plug-ins vetted, they must be submitted under the same license
(New BSD) as fed, and they also must be posted or otherwise sent to the fed
developers.  Plug-ins will be vetted when they are not malicious, explain
themselves thoroughly and precisely, and if they are unique or useful.

Vetted plug-ins that ship with fed:

 - ispell checker (works only if you have ispell installed)
 - figlet generation
 - htmltidy (works only if you have libtidy+deps installed to php5)
 - xmltidy (works only if you have libtidy+deps installed to php5)

Installation

Users may install fed plug-ins by including them in their .fed configuration
file, as mentioned above in the section ".fed configuration"

Authoring Plug-ins

Helper code is found in the authors/ folder of the package.

To author a plug-in, simply write a PHP file, with the following special
circumstances:

1) fed will supply a variable $INCOMING inserted after the leading ?php tag
   this variable contains the content of the clipboard or selection, or
   the entire file if nothing has been selected.
    
2) fed will expect your plug-in to output results in the following format:

<option>--fedboundary--<result>--fedboundary--<option>--fedboundary--<result> ...

If no --fedboundary-- is provided, the sole result will be inserted either
into the clipboard or to replace the selected area, or the entire file.



Appendix: Desired Plug-ins
------------------------------------------------------------------------------

These are plugins that could be written but haven't been written yet.
Feel free to write one or a group of them, and submit them to us!

 - Enchant spell checking (uses PHP Enchant object)
 - Cryptography (Crack,Hash,Mcrypt,Mhash)
 - Store-retreival plugin that uses Sqlite3 to store stuff
 - FriBiDi support
 - Pspell support
 - base64 support!
 - uuencode support!
 - PHP testing sandbox? With Parsekit support?
 - DOMDocument stuffywuff
 - cURL ops
 - wget ops, perhaps web api support to third-party services
 - Content search plugins supporting mnoGoSearch, Sphinx, Swish and Solr
 - Regex
 - ssdeep
 - XML-related stuff
 - more spreadsheet-like functionality adding two columns etc
 - soundex

Appendix: What Could Be
------------------------------------------------------------------------------

These are just some ideas and notes about future features that we may or may
not get a chance to implement.

 # Notes, overlays and file-specific histories
 - .yourfile.fed ; a file that appears next to the file you are/were editing,
   that contains persistence information such as sticky notes, undo history,
   and other data that tells fed about previous sessions, suppressed with
   -memory, activated with +memory

 # Support for more than 16 colors

 # Full integration with man, and becoming a legit unix package!

 # Being packaged with some tasty linux distributions

 # Smarter plug-in integration (is it even possible?)
 - possibly with other scripting languages such as bourne shell and perl

 # Auto-complete and Intellisense

 # co-installed with a graphical version that works in both Gnome and KDE

 # one that works on your friggin' iphone or android time waster

 # Tighter, optimized undo with keystroke memory instead of simple snapshots

 # a confirmation question for "similar" files or educated file guesses 
   during load from command line

 # Some of the Known Issues are fixed

 # Some of the features in /docs/notes/README.old

 # Your ideas


Appendix: Contributions
------------------------------------------------------------------------------

Freenode.net Debuggers: twkm, ThFabba, solbakken, Xgc

Code insulters: mbohun

Testers: akimbo, Mladen Mijatov, overminddl

Compliments: Woody March-Steinman (armchainmstenw)

Source: README, updated 2011-03-19