Giter Site home page Giter Site logo

se's Introduction

			 ___  ___ 
			/ __|/ _ \
			\__ \  __/
			|___/\___|

			http://se-editor.org/

This is the source code for the text editor, se ('Screen Editor').
se is a screen oriented version of the classic UNIX text editor ed.
The editor implements many of the commands of ed, but instead of
being line oriented, se is screen oriented.

Se started out as the version of 'ed' that came with the book 'Software
Tools', by Kernighan and Plauger, which was written in Ratfor. On the Pr1me
computers at the School of Information and Computer Science at Georgia Tech,
Dan Forsyth, Perry Flinn, and Alan Akin added all the enhancements suggested
in the exercises in the book, and some more of their own. Jack Waugh made
extensive modifications to turn it into a screen editor; further work was done
by Dan Forsyth. All of this was in an improved Georgia Tech version of Ratfor.

Later, Dan Forsyth, then at Medical Systems Development Corporation,
converted the Ratfor version into C, for Berkeley Unix (4.1 BSD). At Georgia
Tech, Arnold Robbins took the C version and added many new features and
improvements, the most important of which was termcap support and System V
support. The existing help screens were edited and completed at that time, as
well. This was completed in early 1985.

In early 2013, Thomas Cort continued maintenance of se, modernizing
the code base and build system to support current POSIX operating systems.
Thomas' primary motivation is to preserve this bit of computing history.
His goals are to squash any remaining bugs and make se as portable as
possible. No major new features will be added. He can be reached at
[email protected]

se's People

Contributors

tcort avatar sirwumpus avatar jturner avatar mndrix avatar

Stargazers

Jeffrey H. Johnson avatar  avatar Kyle Mitchell avatar Stephen Wall avatar  avatar  avatar Masanori Ogino avatar  avatar  avatar Stuart avatar  avatar Stefan avatar George Brown avatar ziun avatar Jochen Schneider avatar  avatar  avatar Bocke avatar Lewis Weinberger avatar ryan avatar  avatar Weitian LI avatar freon avatar darolew avatar  avatar Robert Wang avatar Konstantin avatar Tanami avatar  avatar  avatar  avatar Xe Iaso avatar Mantas Mikulėnas avatar  avatar Serge Zaitsev avatar Marc Simpson avatar John Honniball avatar Israel Chauca Fuentes avatar

Watchers

 avatar Neustradamus avatar  avatar James Cloos avatar  avatar John Honniball avatar  avatar Stuart avatar  avatar  avatar

se's Issues

Support ed(1) `Q` command.

se supports q!, an ex/vi command. to quit the editor ignoring any file changes For consistency with ed(1), it should also support Q.

Patch for configure build process.

Sorry this is not a proper pull request (wasn't expecting to do this). Anyway, I've generated a small patch that should update and simplify generating configure et al. WRT to some of the obsolete macros etc.

build.patch

Tested against:

autoconf (GNU Autoconf) 2.71
automake (GNU automake) 1.16.5

<BACKSPACE> & <CTRL>-u inverted.

I received this report via e-mail and can confirm the results:

I downloaded latest `se`, running the build on OS X Yosemite.  It seems like <CTRL>-u
and <BACKSPACE> are somehow inverted. After going into `append` mode: <BACKSPACE>
clears the whole entered line, whereas the `ed`/`sh` typical <CTRL>-u  which should clear
the whole line is erasing one character of input at a time.

Further investigation is needed.

Remove crypt support.

From Single Unix Specification (POSIX.2) ex(1) and vi(1) Rationale;

Historically, the ex and vi utilities accepted a -x option, which did encryption based on the algorithm found in the historical crypt utility. The -x option for encryption, and the associated crypt utility, were omitted because the algorithm used was not specifiable and the export control laws of some nations make it difficult to export cryptographic technology. In addition, it did not historically provide the level of security that users might expect.

Given POSIX's removal of encryption support from ex(1) and vi(1) and any appearance of the -x option ed(1) would have been removed on similar grounds, it should likewise be removed from se; see oy[key] command.

se can't handle width beyond a certain limit

If you start se with a terminal that is wide enough, se will only display a blank screen. I have seen this happen on more than one computer with different operating systems (osx and windows in cygwin).

You can still exit se with q <RET> when the screen is blank.

Tag a new release

It seems quite a few updates have been made since the last release, which is very old at this point. It would be nice to have a new release as I'd like to port this to MacPorts.

stty(1) keys not respected

se should support stty(1) keys for (command) input.

  • It appears that DEL (^?) is hard coded and is suppose to behave like the kill line key (^U) according to the man page.

  • The erase key typically set to either BS (^H) or DEL (^?) does not erase visually when set to BS.

  • The kill line key (^U) does not erase the command line..

  • The word erase key (^W) appears to behave like kill line (^U), but does not visually erase the command line. It should just erase the previous word.

The stty(1) keys can vary in combination with the terminal emulator being used (mintty, putty, kitty, etc.). For example using kitty, DEL appears as an ANSI escape sequence.

Supporting stty(1) control key behaviour would simplify behaviour and avoid confusion by new users already familiar to using stty(1) keys in the shell and ed(1).

Illegal address error entering insert mode on an empty buffer

I received this report via e-mail and can confirm the results:

the `i` command, when executed on the empty buffer in `ed` is a valid entry into input mode,
but on `se` is throwing an illegal address error.

Further investigation is needed to determine if it should be allowed and how to allow it.

se never inserts tabs

It seems like se never inserts any tabs. Even when XTABS is off. C-x simply inserts the amount of spaces that you have set tabstop to be. Is this the desired behaviour? Because I wouldn't think it is.

Use POSIX regex library

Consider using the standard POSIX regex library supplied with most base OSes. (Or a configure time option to use PCRE library.)

  • Avoids potential implementation differences.

  • Takes advantage of 3rd party maintenance.

  • Allows for an option to switch between Basic Regex (historical, old, cumbersome) or Extended Regex (easier, better). See man regex REG_EXTENDED flag.

Provide online documention / man page.

Providing online documentation and examples of the commands and usage might help new comers better evaluate the software without the need to install the package (assuming the distro has a pre-built package).

Character addressing doesn't scale

I'm sure back in the day when screens were smaller, addressing from A to Z wasn't an issue. But on todays screen the alphabet barely covers half of the screen. Therefore I suggest making the indexing more scalable by doing:

X
Y
Z
AA
AB
AC
..
AX
AY
AZ
BA
BB
BC

and so on.

What do you think?

I suppose this is more an enhancement request than a bugfix.

config.in missing

Trying to clean up the configure et al. process. I'm pretty close, but running automake results in:

elf$ automake
configure.ac:93: error: required file 'config.in' not found

See configure.ac

configure.ac:AC_CONFIG_HEADERS([config.h:config.in])

Autoconf errors when building on Ubuntu 14.04

configure.ac:10: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:11: error: possibly undefined macro: AM_SILENT_RULES

Alternative Licensing

Please provide an alternative licensing option.

Public Domain is harmful/problematic, because it's regulated differently depending on the country, and in some the regime requires payment. E.g. in Argentina and Uruguay, any use of the work, even non-commercial, requires paying a fee to the state, so lawful use is impaired, and crearly against the intent/spirit of putting it in PD.

Dynamically discover keymap

Depending on the operating system / terminal, the special keys don't work as expected when entering text. For example, backspace on my Debian/x86 machine clears the line while Ctrl+U does the backspace operation (deleteing 1 character to the left of the cursor). I believe this is due to differences in operating systems and terminals. This holds for both inserting/appending as well as entering commands. It seems like a common problem.

At present, se hard codes in all of the control sequences for performing specific operations. These are defined towards the end of src/se.h. It should probably not hard code the escape codes and instead discover them at runtime. I'll need to do a bit more investigating, but as far as I can tell, se should be able to configure itself using data from termcap (see Keypad and Function Keys in the termcap manual).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.