Copy Link
Add to Bookmark
Report

Saxonia Issue 04 Part 022

eZine's profile picture
Published in 
Saxonia
 · 5 years ago

  

Unix and texteditors
By Rumrunner/VOID
l

On the Amiga the choice of a texteditor is fairly simple. Both CygnusEditor
and GoldEd is up to every imaginable task.

On Unix I have yet to come across an editor I really like. There are
basically two kinds of editors available on Unix. There are the ones for
your regular tty (80*25, 80*50 and whatever), and those for X. Some also
works in both environments. You have an editor named nano that runs in
textmode, which is fast and easy if you just need to type in some lines
of text. However, it lacks features like copy and paste. You can cut a whole
line and then insert it, but that's all. You can also use a program like
gpm which gives you a mouse on your textmode console, and enables copy
and paste. However, it doesn't always work decent.

Ofcourse, we have the common editors like vi, vim, and elvis, which are
useless. They work in two modes, commandmode and editmode. Depending on
version, patchlevel and whatever, you start (usually) in commandmode, and
have to type the letter i to be able to insert text, but hold on a second.
In some of the said editors, you first have to mode to the line and place
in line where you want to enter text, since moving with the arrowkeys
change from insertmode to commandmode. Most of these editors also require
you to change from insertmode to commandmode (by pressing escape), before
you are allowed to delete text entered on another line. In other words, if
you notice a typing error two lines up and move there with the arrowkeys,
you have to enter commandmode to delete the errors, if the editor doesn't
change to commandmode when moving. Some people say that you can work
faster with this type of editor than others, since you for instance can
use letterkeys to jump around in your text once you're in commandmode.
That's pure shite if you ask me, pressing escape, then moving with the
letterkeys, then pressing i for insertmode is nowhere near as fast as using
the arrowkeys. And even if it was, I would never become used to doing that.
Where do you find a keyboard without arrowkeys by the way? I've never seen
one. And I don't care if arrowkeys doesn't work with telnet if you're on
this and that computer, and the remote computer where you run the editor is
this and that model with whatever shite running. I edit my texts on
the computer I'm sitting infront of.

Some of these editors also have graphical modes (for use in X). There's
gvim, kvim, and also a vimpart for use in the regular kde-editors. Neither
of them are any better than the textmode ones.

Kde, the K Desktop Environment has alot of editors. There's kedit, kwrite,
kate and some others meant for special purposes, like writing webpages and
stuff like that. Note though that all of these editors use the same basic
editor and just add buttons and gadgets, and perhaps some more functions.
Kate works decent, it handles several files at a time, it has syntax-
highlighting for those who find that important, and, as every graphical
editor, they support copy and paste. Another nifty function is that you
can set marks in your text and jump from mark to mark, just like in
Asm-One. What made me too mad about the editor to use it in the end was the
autoindenting. I like editors having some kind of autoindent. The Asm-One
editor is perhaps the best. It indents to where you started writing at the
previous line, and if you press enter without entering anything on the new
line. It stops indenting and also remove the tab on the empty line.
CygnusEditor also does a good job, it keeps the indenting from previous line
if you hold down alt while pressing enter. What kate and the other kde
editors do is to indent everything to the closest line above where you have
some text. This means that if you have finished a paragraph, pressed enter
once, removed the indent and then press enter again, it indents to where
you started your text two lines up. This got me so pissed that I only use
this editor for converting between lf and cr/lf linebreaks nowadays.

If I really need to use a textmodeeditor, I prefer one named le. It can
only have one file open at the time, but you have the possibility of
marking, copying and pasting text, and you can also use this editor as a
hexeditor, if you start it with le -h. The hexeditingpart is fairly nice.

After a while, I have started to use the editor Emacs. If you have ever
run memacs coming with WorkBench3.1, you know some of what it's about,
however, Emacs has more functions. The biggest drawback with Emacs is that
it's big and slow, however not as slow as kate if you don't run kde as your
windowmanager. Strangely enough, it's faster in X than it is in textmode.

There are some things about Emacs also that pisses me off. If you name a
file #?.c, #?.s and the like, it uses some autoformatting on the text,
I almost didn't recognise my own code. What I did about this was to find
the directory where Emacs stores it's modes, and renamed the directory
named progmodes to shittyprogmodes or similar. I lose autoindent but
atleast I recognise the code I've just written.

There are also strange keycombinations to do things in Emacs, for instance,
for opening a file, you press control-x control-f, then enter the filename
or press enter to get a directorylisting. You save with control-x
control-s. To close some of the opened files, you enter
alt-x kill-some-buffers. If you want to mark text, you start the markarea
with control-space and move to the end, press control-w to cut, alt-w to
copy, and when you want to paste text, you do it with control-y. The
marked area, doesn't change colour like in CygnusEditor, but it does if
you mark it with the mouse, which also is possible. If you mark text with
the mouse, and don't cut or copy it, you can also paste it into other
programs by pressing the middle mousebutton where you want the text
entered. You also have to paste into the editor from other programs this
way, as it doesn't use any other common clipboard, supporting control-c,
control-v and the likes.

Well, atleast it works.

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT