#253631 - 07/04/2005 13:14
Linux Text Editor
|
pooh-bah
Registered: 27/02/2004
Posts: 1913
Loc: London
|
I sometimes have to edit files in Linux and I HATE using vi, is there a non gui, non xwindows editor like Dos edit available for Linux? No special requirements, just something where I don't have to remember to press I for insert or cw for change word...
|
Top
|
|
|
|
#253632 - 07/04/2005 13:23
Re: Linux Text Editor
[Re: tahir]
|
carpal tunnel
Registered: 30/10/2000
Posts: 4931
Loc: New Jersey, USA
|
I use pico mostly. I also can't stand vi. Probably only because I don't use it enough to get used to it.
_________________________
-Rob Riccardelli 80GB 16MB MK2 090000736
|
Top
|
|
|
|
#253633 - 07/04/2005 13:39
Re: Linux Text Editor
[Re: robricc]
|
pooh-bah
Registered: 27/02/2004
Posts: 1913
Loc: London
|
Thanks very much Rob, like you it's only occasionally that I have to edit a file and to be frank I find vi scary
Looks easier than vi, but the cursor keys seem to delete text if I scroll backwards (like backspace) is that just the way it is?
|
Top
|
|
|
|
#253634 - 07/04/2005 13:48
Re: Linux Text Editor
[Re: tahir]
|
carpal tunnel
Registered: 30/10/2000
Posts: 4931
Loc: New Jersey, USA
|
The back arrow isn't deleting text for me and never has. I am not sure what setting (if any) would cause that. Are you sure text is going away?
_________________________
-Rob Riccardelli 80GB 16MB MK2 090000736
|
Top
|
|
|
|
#253635 - 07/04/2005 13:54
Re: Linux Text Editor
[Re: robricc]
|
pooh-bah
Registered: 27/02/2004
Posts: 1913
Loc: London
|
I'm having term type problems that are doing weird things to my screen too, I'd better get those figured before I start on pico. Thanks for your help though.
|
Top
|
|
|
|
#253636 - 07/04/2005 19:41
Re: Linux Text Editor
[Re: tahir]
|
carpal tunnel
Registered: 08/06/1999
Posts: 7868
|
If pico is not on the machine, nano (a clone of pico) or joe might be. Both are easier to use.
However, still try to learn vi to the point of usability, in case none are available.
I remember the following for vi:
Arrow keys navigate i changes to insert mode to type where the cursor is Esc backs out of the insert mode x when not in insert mode deletes the character under the cursor dd deletes a line :w writes the file to disk, :q quits, :q! quits without saving
|
Top
|
|
|
|
#253637 - 07/04/2005 20:25
Re: Linux Text Editor
[Re: drakino]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Quote: Arrow keys navigate
Not always. Even when they do, accidentally using them in insert mode can often cause problems.
Better to rely on hjkl: h is left, l is right, k is up, and j is down. This becomes somewhat less obtuse when actually using it.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#253638 - 07/04/2005 21:34
Re: Linux Text Editor
[Re: wfaulk]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Quote: Not always. Even when they do, accidentally using them in insert mode can often cause problems.
If your arrow keys aren't working in vi, then your terminal settings are borked. Besides, accidentally using hjkl in insert mode can often cause problems, too.
|
Top
|
|
|
|
#253639 - 07/04/2005 23:07
Re: Linux Text Editor
[Re: tonyc]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Actually, some versions of vi simply don't support the arrows, period. I'll give you that it's been a while since I've seen one, but I learned it the hard way.
Also, adding a few extra characters isn't really as bad as the things that the arrow escape sequences can do.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#253640 - 07/04/2005 23:20
Re: Linux Text Editor
[Re: wfaulk]
|
addict
Registered: 03/08/1999
Posts: 451
Loc: Canberra, Australia
|
Heh - it took me years of using VIle before I found out that I could use $ to go to the end of the line rather than A<esc>...
I notice no-one has suggested emacs. That's probably because it's even more arcane and brain-draining than vi.
Most people are probably using vim as a replacement for vi now. Vim does all sorts of things, like allowing you to move around while in insert mode and syntax highlighting, that are pretty nifty. If you're not using vim and you've used vi a bit, then this may be a good thing to try.
Otherwise, I just use nedit. Even if I have to use ssh -X.
Have fun,
Paul
_________________________
Owner of Mark I empeg 00061, now better than ever - (Thanks, Rod!) - and Karma 3930000004550
|
Top
|
|
|
|
#253641 - 08/04/2005 00:00
Re: Linux Text Editor
[Re: PaulWay]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Emacs: combining all the power of EDLIN with all the ease-of-use of EDLIN.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#253642 - 08/04/2005 07:29
Re: Linux Text Editor
[Re: tahir]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
I really like Joe, it has the old Wordstar keybindings (Ctrl-K-B to start a block, Ctrl-K-K to end a block, Ctrk-K-C to copy the block, Ctrl-K-H for help on the other keybindings etc). I tend to only edit files on Linux once or twice a week, so I need an easy to use editor that doesn't need to have too many bells and whistles. Joe meets my needs in ways vi and emacs can't... http://sourceforge.net/projects/joe-editor/There seems to be a total lack of screenshots of Joe on the web, so here are a few to give you a flavour. Selecting a block: Running a search and replace: Showing the help:
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#253643 - 08/04/2005 08:15
Re: Linux Text Editor
[Re: tonyc]
|
pooh-bah
Registered: 27/02/2004
Posts: 1913
Loc: London
|
Quote: If your arrow keys aren't working in vi, then your terminal settings are borked.
I like your diagnosis, definitely borked.
Tried AEE, emacs and pico but I'm not getting anywhere really, I need to unbork my tty settings. I access the Linux box from my Win2K PC using a terminal emulation application that's set to use wy60 settings, these work fine in the application but not at the shell prompt. At the shell prompt I've tried:
export TERM=wy60 (and vt100 and ansi) but can't get my arrow keys to work properly.
|
Top
|
|
|
|
#253644 - 08/04/2005 12:00
Re: Linux Text Editor
[Re: tahir]
|
journeyman
Registered: 08/10/2004
Posts: 53
Loc: Trondheim, Norway
|
Maybe you should try Ed...
_________________________
- Audun E -
|
Top
|
|
|
|
#253645 - 08/04/2005 12:31
Re: Linux Text Editor
[Re: AudunE]
|
pooh-bah
Registered: 27/02/2004
Posts: 1913
Loc: London
|
ED WILL NOT CORRUPT YOUR PRECIOUS BODILY FLUIDS!! Well that's allright then
|
Top
|
|
|
|
#253646 - 08/04/2005 13:36
Re: Linux Text Editor
[Re: tahir]
|
pooh-bah
Registered: 13/09/1999
Posts: 2401
Loc: Croatia
|
Do you know whether the application uses (n)curses library or something of its own? Also, curses package has two terminal capability databases: termcap (older) and terminfo (newer). Perhaps something is wrong with that part of setup. Another thing: IIRC, the default codes wyse60 arrow keys generate are very badly chosen: down-arrow sends linefeed, left-arrow backspace etc. When I was working with physical wy60 terminals I was always remapping them to some ESC sequences (but then I had to tweek all terminal capability descriptions) I would suggest that you first swithc your terminal emulator to something else (e.g. vt100, if you don't need function keys), and set TERM env variable accordingly. Then, using octal dump (od) command verify that arrow keys produce ANSI escape sequences (or whatever is expected of the terminal emulated by your amulator). Finally, use infocmp to verify that terminal capability database contains correct definitions. Or, if you want to avoid learning much more about Unix 'TUI' handling than you ever wanted to know, switch to something with WS-like navigation, as suggested (but there things also can go wrong, from similar reasons: editor has to know how to repaint the screen etc).
_________________________
Dragi "Bonzi" Raos
Q#5196
MkII #080000376, 18GB green
MkIIa #040103247, 60GB blue
|
Top
|
|
|
|
#253647 - 08/04/2005 13:47
Re: Linux Text Editor
[Re: bonzi]
|
pooh-bah
Registered: 27/02/2004
Posts: 1913
Loc: London
|
Thanks for that Bonzi
I think I'll wait till somebody in support's free to sort it out for me. Call me stupid but Dos 5.0 was my favourite OS.
|
Top
|
|
|
|
#253649 - 08/04/2005 14:48
Re: Linux Text Editor
[Re: bonzi]
|
pooh-bah
Registered: 27/02/2004
Posts: 1913
Loc: London
|
Glad you resisted the temptation to call me stupid
|
Top
|
|
|
|
|
|