Vi, or Some Other Editor?

Black Hole

May contain traces of nut
(cotinued from HERE)

No, sed is a stream editor, ed is a line-based editor.
Almost as bad! I seem to remember something like that in the early days of MS-DOS :rolling:

"vi is an editor with two modes: one which destroys your input and the other which beeps at you."
Brilliant (and hilarious)!

What editor features would you miss? I'll bet Vim can do it.
The thing is, it's not "features" the occasional file-tweaker needs, it's intuitive usage. At least now vi can use the cursor keys, I remember having to use the h j k l keys to move the edit cursor (had to look that up).

I think one could get by if the cursor keys work, backspace and delete work, and typing anything inserts it straight in at the cursor (instead of having to enter "insert mode"), then Ctrl-Z asks you whether you want to save, save as, or quit without saving.

Beyond that home, end, Ctrl-home, Ctrl-end would be nice, and a means to mark, Ctrl-C, Ctrl-X, Ctrl-V.
 
I think one could get by if the cursor keys work, backspace and delete work, and typing anything inserts it straight in at the cursor (instead of having to enter "insert mode"), then Ctrl-Z asks you whether you want to save, save as, or quit without saving.

Beyond that home, end, Ctrl-home, Ctrl-end would be nice, and a means to mark, Ctrl-C, Ctrl-X, Ctrl-V.

Yeah, that's all there but you have to re-learn it. ( :1 for home, :$ for end, Shift-V to mark, yy to copy, p to paste - can also copy/paste to named buffers which is particularly useful). I don't use the cursor keys, happy keeping my fingers near the home keys.

We definitely should have another editor package available that we can point people to who need to tweak a file on the box. FTP + Windows causes too many issues with line endings. Joe sounds like a candidate, or perhaps pilot? We probably shouldn't have too many different options.

I will get around to adding a text editor the web interface at some point for these simple tweaks.
 
Can the syntax highlighting be turned off (preferably by default)? Confusing for people used to Notepad.
 
Vi is for geeks, but I agree that something like joe or nano should be included for novices who just want to tweak one or 2 simple files to make something work.

Apart from that, I'm surprised that Emacs hasn't been mentioned yet, although my personal view on that is that it's a decent Operating System, if somewhat lacking in editing facilities. Never mind though, you can always use it to play Tetris.
 
You're right

Not particularly, but I wouldn't add packages which weren't targetted for a small embedded system - so if someone submitted emacs I probably wouldn't publish it without a discussion!

Bearing in mind that some of the EMACS backronyms are "Emacs Munches All Computer Storage" or "Eighty Megabytes and Constantly Swapping", I'm with Af123 on that one.
 
Apart from that, I'm surprised that Emacs hasn't been mentioned yet, although my personal view on that is that it's a decent Operating System, if somewhat lacking in editing facilities. Never mind though, you can always use it to play Tetris.
As much as I like Emacs, in a terminal and on an embedded system it is no fun. It just takes too long to load, and it has too many buffers in the background. But I am a very happy user of jed - a light nimble Emacs clone with mostly compatible commands (although the replace commands have some naming differences). It works in a Debian chroot, but I supposed it could also be compiled for uclib.
 
Can the syntax highlighting be turned off (preferably by default)? Confusing for people used to Notepad.

The ':syntax off' command is worth a punt, but making it the default is more difficult as root's home directory is '/' and therefore doesn't persist beyond a reboot.
 
Oh no, someone beat me to the emacs operating system joke! Although I have to say it's by far and away my favourite editor for daily use at work. It was a great joy to discover it after many painful years of vi...

Having said that, I am under no illusion about the idea of trying to run it on the humax. Bad!

And this has brought back long forgotten unpleasant memories of having to use h j etc to move the cursor in vi. Bleh!

Anyway, what a fun way to spend a Tuesday evening, reliving the great text editor Holy War!

But seriously, for this purpose I'd be happy to stick with vi, although I don't have much experience of all the other lightweight editors like nano.

Sent from my HTC Desire S using Tapatalk
 
I think most people will advocate their own favourite editor. However, if we are looking to provide something that novice users can easily use then I think something like nano would be the way to go. The reason for this is that most users will probably only want to use the save command anyway after some basic editing. Since nano uses ctrl-X for save it would be much easier to explain to novice users since it is on-screen and is a single command. The likes of emacs and joe use ^x c and ^k x respectively. Most editors will allow redefinition of the command keystrokes but it is probably easiest to use one that does it by default.
 
There seems to be quite strong feelings about editors, Emacs followers seem to have turned it into a Religion by setting up news group Alt.Religion.Emacs and claiming that vi is the Editor of the beast (vi vi vi is 666 in Roman Numerals). If we're taking a vote I would stick with vi
 
There are always strong feelings about editors and I'm not entirely sure why! I'm happy with vi, I don't expect everyone else to be and I certainly don't think it's of any practical use to novices. I think nano is a clear winner to add to the repository to provide an alternative (or maybe pico if nano is too large).

...novices who just want to tweak one or 2 simple files to make something work.

Well, if you update your webif packages, you'll find a (very) simple text editor option on the diagnostics page.

That may not be where it ends up, but it lets people do things like update their /mod/etc/exports file without having to use telnet and an unfamiliar editor or FTP and experience the newline conversion that almost inevitably occurs when they open the file in a Windows program.
 
There are always strong feelings about editors and I'm not entirely sure why!
I don't think that's confined to editors. I believe it's about the time invested getting to know the ins and outs of one editor in particular, and therefore a natural unwillingness to switch. That does not account for trying to sway somebody else, without the same time investment, to your particular editor. The situation is (was!) the same with me and microprocessors - I knew how to use a Z80 in miniscule detail, so if I needed to embed a micro the Z80 would be the first choice even if it was not the perfect match for the job.

With my management hat on I try to take a detached view and observe what is needed rather than what my preferences might be.
 
Excellent, I hadn't spotted that one before - any chance of a browser interface as well? ;)
It's early, which may account for it, but I don't understand!

The editor needs some more checks in it to make sure that you don't try to edit a very large or binary file, although all you will do is kill your browser at the moment : )
 
It's early, which may account for it, but I don't understand!

The editor needs some more checks in it to make sure that you don't try to edit a very large or binary file, although all you will do is kill your browser at the moment : )

It would be helpful to be able to navigate to files and then select them for editing.
 
Well, if you update your webif packages, you'll find a (very) simple text editor option on the diagnostics page.

Editor works well, file navigation would be good, But as it is likely to be used by most people very rarely, It's just the thing to able to say goto Diagnostics >> File Editor and enter /mod/etc/modservices for example
 
Back
Top