Vim?
--
XV125 -> GN125 -> F650GS -> ?
googletalk: jakub (at) mikusek (dot) org / gg: 3386899
> Is there a quality Mac OS X Text Editor that takes its commands from a
> command line rather by having you press some combination of or sequence
> of keys?
Can you give a fuller explanation of what you're looking for, or at
least rephrase the question? As posed, the question itself simply
doesn't make sense to me. In particular, I'm wondering if you're using
the phrase "command line" the way I understand it.
--
"Harry?" Ron's voice was a mere whisper. "Do you smell something ... burning?"
- Harry Potter and the Odor of the Phoenix
man sed
--
Dave Seaman
Third Circuit ignores precedent in Mumia Abu-Jamal ruling.
<http://www.indybay.org/newsitems/2008/03/29/18489281.php>
> On 2009-01-23, Gary <gar...@hotmail.com> wrote:
> > Is there a quality Mac OS X Text Editor that takes its commands from a
> > command line rather by having you press some combination of or sequence
> > of keys?
>
> Vim?
Useful for cleaning sinks and baths ...
--
Tim
"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
>> > Is there a quality Mac OS X Text Editor that takes its commands from a
>> > command line rather by having you press some combination of or sequence
>> > of keys?
>>
>> Vim?
>
> Useful for cleaning sinks and baths ...
Because?
> Is there a quality Mac OS X Text Editor that takes its commands from a
> command line rather by having you press some combination of or sequence
> of keys?
>
It is not clear to me what you are asking for. Almost every "text
editor" will require you to press "some combination" of keys to convey
your intention to the program about how you wish to change a file.
If you want to modify a file based on a command, there is sed, which
calls itself a "stream editor". It will read a file and modify it
according to a set of commands you type into the command or put into an
external file in one pass through the file. I would also call this a
"batch editor". See 'man sed' in Terminal.
> Is there a quality Mac OS X Text Editor that takes its commands from
> a command line rather by having you press some combination of or
> sequence of keys?
Ummm... pressing a combination of or sequence of keys *is* the command
line. What were you asking?
> On 2009-01-23, Tim Streater <timst...@waitrose.com> wrote:
>
> >> > Is there a quality Mac OS X Text Editor that takes its commands
> >> > from a command line rather by having you press some combination
> >> > of or sequence of keys?
> >>
> >> Vim?
> >
> > Useful for cleaning sinks and baths ...
>
> Because?
Well, there's the religious argument (vi (or vim) versus Emacs). But
there's also this, which is illustrative of the punchline:
Haha - got me.
I'm on the other side of the pond - we don't have that fancy stuff here. ;]
Cheerio!
Jakub
Several people have asked for clarification of what I mean by a command line.
I come from IBM mainframe days, leading to PCs. Only recently have I
converted from PC to Apple Mac. On the mainframe IBM I used an editor
named XEDIT. The text file would be shown full screen, with a "prompt"
line at the top or bottom of the screen. On this line you would issue
commands such as
-----> CHANGE /X/Y/ * *
which meant to change every character X to character Y, all occurrences
on the current line, for all the remainder of the lines in the file.
Or you might say
-----> SAVE temp.fil
which would save the current file into a place named temp.fil. A final
example, you could issue
-----> LOCATE /Abraham/
to move to the line with the specified string.
When moving to the PC, a company named Mansfield Software wrote KEDIT,
which copied XEDIT but for the PC. So I have been using the same
editor for the last (over) fifty years.
I have gotten used to issuing commands, and dislike keying ^S for
"search", or Optn-F for "file", or such magic keypresses. It's not
that they're bad, it's just that I have gotten used to something
different. Mark Hessling's THE editor on the Mac looks like
XEDIT/KEDIT, but there has been some difficulty getting it to work in
OS X. So I'm looking for something else.
Mac OS X comes with vim(1), which is a sort of superset of the classic
vi editor. It is a modal editor with three modes:
Text insert mode
Keystroke command mode (vi mode)
Command line mode (ex mode)
When it is in command line mode it behaves as you describe, where you
would for example type "s/X/Y/g" to substitute all instances of Y with X
Ian
--
Ian Gregory
http://www.zenatode.org.uk/ian/
> On Fri, 23 Jan 2009 15:43:21 -0500, Gary wrote:
> > Is there a quality Mac OS X Text Editor that takes its commands from a
> > command line rather by having you press some combination of or sequence
> > of keys?
>
> man sed
"sed" is not an editor per se, it is the stream version filter of an
editor "ed" which is the original unix editor upon which all others are
built upon including vi, vim, and the favored xedit of the OP. Try "man
ed" instead...
vim in terminal would come quite close to that:
man vim in terminal
more comfortable possibly:
http://en.wikipedia.org/wiki/Sam_(text_editor)
or kedit itself:
http://www.drycarbon.com/macosx/kedit/
A whole list here:
http://www.softpanorama.org/Editors/eoe.shtml
HTH
Marc
--
remove bye and from mercial to get valid e-mail
<http://www.heusser.com>
If you want a really traditional CLI text editor, there's "ed". A
little more modern is "ex".
--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
You didn't read the question carefully.
I know what sed is. It has become evident from followups that sed is not
what the OP had in mind, but that was not at all obvious from his
original description.
For example, consider the invocation
sed -e 's/this/that/' infile >outfile
in which the command 's/this/that/' is indeed taken from the command line
rather than by having you press some combination of or sequence of keys
(interactively, as in vim when running in command mode). That is what was
asked, and that is precisely what sed provides.
Well, fine, but evidently the OP wants XEDIT under OS X, not something
that is "close". I am familiar with XEDIT under VM/CMS, having used it
for 12 years or so on ascii terminals with 3270 emulation. Personally I
dumped it the instant I was able to use Notepad and DXnotepad on Sun and
DEC unix boxes.
I just tried kedit, but I couldn't see the command/prompt line that the
OP would want.
[...]
> I come from IBM mainframe days, leading to PCs. Only recently have I
> converted from PC to Apple Mac. On the mainframe IBM I used an editor
> named XEDIT.
[...]
> Mark Hessling's THE editor on the Mac looks like XEDIT/KEDIT, but there
> has been some difficulty getting it to work in OS X. So I'm looking for
> something else.
Why not use xedit on the Mac?
Xedit gets installed with X11. I have it here in OS 10.4.11, - I don't
know if its still in X11 on Leopard but its been included with X11 since
day 1.
Just add xedit to the X11 "Applications" menu for a quick launcher.
--
dee
> On Fri, 23 Jan 2009 21:23:46 -0500, Gary wrote:
>
> [...]
> > I come from IBM mainframe days, leading to PCs. Only recently have I
> > converted from PC to Apple Mac. On the mainframe IBM I used an editor
> > named XEDIT.
>
> [...]
>
> > Mark Hessling's THE editor on the Mac looks like XEDIT/KEDIT, but there
> > has been some difficulty getting it to work in OS X. So I'm looking for
> > something else.
>
> Why not use xedit on the Mac?
Presumably because he wants XEDIT and not xedit.
You want 'ed' or something like it. Open a Terminal window and type
man ed
and see if you like it.
--
I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo
>
> Well, fine, but evidently the OP wants XEDIT under OS X, not something
> that is "close".
There is an xedit in the macports distribution:
$ port list | grep xedit
hexedit @1.2.12 sysutils/hexedit
xedit @1.1.2 x11/xedit
More info here: <http://www.macports.org/>
--
> In article <pan.2009.01.24....@emteedee.invalid>,
> Mike Dee <mik...@emteedee.invalid> wrote:
>
> > On Fri, 23 Jan 2009 21:23:46 -0500, Gary wrote:
> >
> > [...]
> > > I come from IBM mainframe days, leading to PCs. Only recently have I
> > > converted from PC to Apple Mac. On the mainframe IBM I used an editor
> > > named XEDIT.
> >
> > [...]
> >
> > > Mark Hessling's THE editor on the Mac looks like XEDIT/KEDIT, but there
> > > has been some difficulty getting it to work in OS X. So I'm looking for
> > > something else.
> >
> > Why not use xedit on the Mac?
>
> Presumably because he wants XEDIT and not xedit.
Oopsie, didn't read this before I posted. What's the difference?
--
> Tim Streater <timst...@waitrose.com> wrote:
>
>> Presumably because he wants XEDIT and not xedit.
>
> Oopsie, didn't read this before I posted. What's the difference?
Because the X11 xedit comes nowhere close to the XEDIT that the OP wants.
$ port info xedit
xedit @1.1.2, Revision 1 (x11, editors)
Variants: universal
Simple text editor for X11
Homepage: http://www.x.org/
> Bjarne Bäckström wrote:
>
>> Tim Streater <timst...@waitrose.com> wrote:
>>
>>> Presumably because he wants XEDIT and not xedit.
>>
>> Oopsie, didn't read this before I posted. What's the difference?
>
> Because the X11 xedit comes nowhere close to the XEDIT that the OP wants.
>
> $ port info xedit
> xedit @1.1.2, Revision 1 (x11, editors) Variants: universal
Thats funny it has exactly the commands that he asked for.
man xedit
--
dee
> I come from IBM mainframe days, leading to PCs. Only recently have I
> converted from PC to Apple Mac. On the mainframe IBM I used an editor
> named XEDIT. The text file would be shown full screen, with a "prompt"
> line at the top or bottom of the screen. On this line you would issue
> commands such as
>
> -----> CHANGE /X/Y/ * *
Could The Hessling Editor be what you're looking for?
Just for different values of "exactly". ;-) Specifically Gary wrote:
> I have gotten used to issuing commands, and dislike keying ^S for "search", or Optn-F for "file", or such magic keypresses. It's not that they're bad, it's just that I have gotten used to something different.
Take look at THE (which he mentioned) here:
<http://www.uic.edu/depts/accc/newsletter/adn12/the.html>
It doesn't look and feel like xedit.
> Mark Hessling's THE editor on the Mac looks like XEDIT/KEDIT, but there
> has been some difficulty getting it to work in OS X. So I'm looking for
> something else.
THE's README file mentions that it has been ported to OS X, so maybe you should
try to work on those difficulties.
perhaps 30 (max).
not 50.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
It's in the Fink distibution, however only as an "unstable" source.
> Mike Dee schrieb:
>
>> On Sat, 24 Jan 2009 23:01:58 +0100, Michael Kallweitt wrote:
>>
>>> Because the X11 xedit comes nowhere close to the XEDIT that the OP
>>> wants.
>>>
>>> $ port info xedit
>>> xedit @1.1.2, Revision 1 (x11, editors) Variants: universal
>>
>> Thats funny it has exactly the commands that he asked for.
>
> Just for different values of "exactly". ;-) Specifically Gary wrote:
No, the commands that he *wanted* were like:
<quote>
On the mainframe IBM I used an editor
named XEDIT. The text file would be shown full screen, with a "prompt"
line at the top or bottom of the screen. On this line you would issue
commands such as
-----> CHANGE /X/Y/ * *
which meant to change every character X to character Y, all occurrences on
the current line, for all the remainder of the lines in the file. Or you
might say
-----> SAVE temp.fil
which would save the current file into a place named temp.fil. A final
example, you could issue
-----> LOCATE /Abraham/
to move to the line with the specified string.
<\quote>
Which _is_ what the X11 installed xedit has. man xedit
>> I have gotten used to issuing commands, and dislike keying ^S for
>> "search", or Optn-F for "file", or such magic keypresses. It's not that
>> they're bad, it's just that I have gotten used to something different.
>
> Take look at THE (which he mentioned) here:
>
> <http://www.uic.edu/depts/accc/newsletter/adn12/the.html>
>
> It doesn't look and feel like xedit.
Thats *fine*. He said he tried "THE" and "THE" didn't live up to his
expectations. He wasn't wanting to use "THE". He was wanting something
else. Perhaps he simply did not realise that xedit was included in the X11
package.
--
dee
> On Sun, 25 Jan 2009 01:57:45 +0100, Michael Kallweitt wrote:
>
>> Mike Dee schrieb:
>>
>>> On Sat, 24 Jan 2009 23:01:58 +0100, Michael Kallweitt wrote:
>>>
>>>> [...]
>>>> xedit @1.1.2, Revision 1 (x11, editors) Variants: universal
>>> Thats funny it has exactly the commands that he asked for.
>> Just for different values of "exactly". ;-) Specifically Gary wrote:
>
> No, the commands that he *wanted* were like:
Just one example:
> -----> LOCATE /Abraham/
>
> to move to the line with the specified string.
You didn't try that, did you? Because the result would have been:
Error: Unfinished command
> <\quote>
>
> Which _is_ what the X11 installed xedit has. man xedit
QED.
> Mike Dee wrote:
>
>> On Sun, 25 Jan 2009 01:57:45 +0100, Michael Kallweitt wrote:
>>
>>> Mike Dee schrieb:
>>>
>>>> On Sat, 24 Jan 2009 23:01:58 +0100, Michael Kallweitt wrote:
>>>>
>>>>> [...]
>>>>> xedit @1.1.2, Revision 1 (x11, editors) Variants: universal
>>>> Thats funny it has exactly the commands that he asked for.
>>> Just for different values of "exactly". ;-) Specifically Gary wrote:
>>
>> No, the commands that he *wanted* were like:
>
> Just one example:
>
>> -----> LOCATE /Abraham/
>>
>> to move to the line with the specified string.
>
> You didn't try that, did you? Because the result would have been: Error:
> Unfinished command
And just *what* did you try to get such an error?
How do you know his example was an actual input?
>> Which _is_ what the X11 installed xedit has. man xedit
>
> QED.
At this point in time, I'd rather get an opinion from the OP, so yes,
"QED - that which was to be demonstrated"
--
dee
> In article <2hajkk....@news.alt.net> Gary <gar...@hotmail.com>
> wrote:
> > Several people have asked for clarification of what I mean by a
> > command line.
> > I come from IBM mainframe days, leading to PCs. Only recently have
> > I converted from PC to Apple Mac. On the mainframe IBM I used an
> > editor named XEDIT
>
> You want 'ed' or something like it. Open a Terminal window and type
>
> man ed
>
> and see if you like it.
Hello! Is there anyone at home?
The OP, as far as I could tell, is not looking for an editor which is
"like" XEDIT, or which has some commands that are superficially similar
to some XEXDIT commands. He wants the exact XEDIT command set, and I've
never seen a unix editor that provides this.
Clear now?
Installed REXX (Regina REXX-Regina_3.4 5.00) from MacPorts, built THE from
sources, and it works. At first it wouldn't find the REXX lib, so I did a quick
$ export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib
Since I'm not really familiar with XEDIT (last time I worked with VM/CMS was in
the 90s), I didn't test it thoroughly.
I see that at lest on reply mentions X11 xedit. Of course, other than by
name, it is in no way related to IBM's mainframe XEDIT.
If you want to issue commands, then there is vi (or fancier versions
like vim). I'm writing this with /usr/bin vi, which is actually vim 7.2,
on an MBP. vi has a command mode (in which it starts) where you can move
around the file, search, copy, paste etc. It also has an edit mode where
you type in your text. The commands are shorter than XEDIT, e.g.,
/[search pattern] to search
:w[file name] to save
:%/[search pattern/[replace text/g for global search and replace
A bientot
Paul
--
Paul Floyd http://paulf.free.fr
> In article <nemoSat01...@news.demon.co.uk>,
> Simon Slavin <sla...@hearsay.demon.co.uk> wrote:
>
>> In article <2hajkk....@news.alt.net> Gary <gar...@hotmail.com>
>> wrote:
>>> Several people have asked for clarification of what I mean by a
>>> command line.
>>> I come from IBM mainframe days, leading to PCs. Only recently have
>>> I converted from PC to Apple Mac. On the mainframe IBM I used an
>>> editor named XEDIT
>>
>> You want 'ed' or something like it. Open a Terminal window and type
>>
>> man ed
>>
>> and see if you like it.
>
> Hello! Is there anyone at home?
>
> The OP, as far as I could tell, is not looking for an editor which is
> "like" XEDIT, or which has some commands that are superficially similar
> to some XEXDIT commands. He wants the exact XEDIT command set, and I've
> never seen a unix editor that provides this.
>
> Clear now?
Tim: My name is OP, and my intent was not to duplicate any particular
command set. My examples were just that. And if "LOCATE" were "FIND"
in some other space, that's fine. Similar with "CHANGE" and "REPLACE"
or "DECIMATE" or "DISTORT" or "RESTATE". What I wanted to avoid was
Ctl-Z-Optn-F (or anything else looking like that).
Michael: You have a distinct advantage over me (which I admire
thoroughly). You know what you're doing!
I'll look around for a command list, because I know from others who
have answered my post that I have access to vim. If you know of such a
list, I'd appreciate a reference. But I'll also look for it myself.
YEA GOOGLE!
> I'll look around for a command list, because I know from others who have
> answered my post that I have access to vim. If you know of such a list,
> I'd appreciate a reference. But I'll also look for it myself. YEA GOOGLE!
Have a portion of vi(m) with your coffee:
<http://www.lob.de/cgi-bin/work/framesetneu?flag=new&frame=yes&id=497cd66322d1c>
(the "vi reference cup")
:-)
OK - my misunderstanding and apols to those I verbally beat up.
> Tim: My name is OP, and my intent was not to duplicate any particular
> command set. My examples were just that. And if "LOCATE" were "FIND"
> in some other space, that's fine. Similar with "CHANGE" and "REPLACE"
> or "DECIMATE" or "DISTORT" or "RESTATE". What I wanted to avoid was
> Ctl-Z-Optn-F (or anything else looking like that).
All the cryptic commands in emacs also have full-word names.
You just have to trigger the command-line by hitting
<esc>-X. (In emacs-speak, that's M-X, but that's not
really important here).
For example, <ctrl>-S (in emacs-speak, C-S) does a forward
search. However, one may also do it by hitting
<esc>-X
search-forward
and a nice thing is that if you don't know the whole
command name, tab does command completion, so you can do
<esc>-X
se
<tab>
and emacs provides a nice long list of options to
complete that command, such as:
search-backward search-backward-regexp
search-forward search-forward-regexp
So the ironic thing is that the editor with probably the
most obscure and cryptic command keys also has a full and
verbose "command line" which may be used instead.
One more thing - if one actually does learn some of the
most commonly used emacs navigation keys - you may be surprised
to learn that Apple has incorporated them into the standard
text widgets:
C-A beginning of line
C-E end of line
C-N next line
C-P previous line
C-F forward character
C-B back character
C-T swap characters at the insertion point
C-D delete character
C-K kill line
C-Y yank line back
C-L recenter window on the cursor
Probably others, but I can't think of any more off the top
of my head which I know work. Try these out in TextEdit.
Unfortunately, C-S and C-R don't seem to work, but they require a
command buffer area in which to type the search terms, so that's
not surprising.
I'm not really recommending this for the OP. But it is
certainly something to consider.
--
Plain Bread alone for e-mail, thanks. The rest gets trashed.
No HTML in E-Mail! -- http://www.expita.com/nomime.html
Are you posting responses that are easy for others to follow?
http://www.greenend.org.uk/rjk/2000/06/14/quoting
> On 2009-01-23, Tim McNamara <tim...@bitstream.net> wrote:
> (...)
>>>>> Vim?
>>>>
>>>> Useful for cleaning sinks and baths ...
>>>
>>> Because?
>>
>> Well, there's the religious argument (vi (or vim) versus Emacs). But
>> there's also this, which is illustrative of the punchline:
>>
>> http://www.unilever.ca/ourbrands/homecare/vim.asp
>
> Haha - got me.
> I'm on the other side of the pond - we don't have that fancy stuff here. ;]
It is available in Europe. It's called Cif in some countries (including
Poland).
--
Joe Kotroczo kotr...@mac.com
Yeah, but does it work on my old Vax?
http://www.vaxusa.com/products.aspx
--
It's times like these which make me glad my bank is Dial-a-Mattress