Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / October 2004



Tip: Looking for answers? Try searching our database.

[OT] Text Editor for OSX

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wren Argetlahm - 03 Oct 2004 15:46 GMT
I apologize in advance for the off-topic nature of
this posting. I've recently been lamenting the
shortcomings of my current text editor for my purposes
(SubEthaEdit since my copy of BBEdit is Classic and a
new one costs way to much for my budget). I did a
quick google search to try and find out what other
options are out there, particularly in the F/OSS realm
and with good support for XML/HTML/etc. And I couldn't
find anything in particular. So, in my infinite (lack
of) wisdom I've decided that it might be good to write
my own.

Enter the problems. Since this is a large undertaking
and it is something I'd like to see finished rather
than remaining in my basement of weekend projects, I'm
looking for guidance. I figure I'll prolly turn
towards SourceForge as a place to host the project and
open it up to the unpaid armies of programmers. But
I'm wondering where all would be a good place to
explicitly seek out such armies? For those who've
played on the project management side of SF, is there
anything I should know (other than what's in the
documentation on their site, soon to be re-read)? Is
there someplace other than SF which might meet my
needs in this regard?

I'm also wondering what text editors y'all use (aside
from the obvious BBEdit) and, more importantly, what
features about them do you like so much? I have a list
of what I consider critical to the project, but I'm
wondering what I've left out to making this a viable
editor for the masses. One biggie for me is
sophisticated syntax highlighting. The highlighting is
definitely going to be extensible, but I'm wondering
what languages y'all would consider essential coming
out-of-the-box for the first release? So far I have:
XML-family (xslt, xhtml, rss), CSS, PHP, Perl, Ruby,
Python, JavaScript, Java, LaTeX, C-family (C, C++, C#,
Objective C), bash, and tcsh.

Since I'm pretty new to GUI programming on Mac, is
there a good place to look for critical analysis of
the best approach? (e.g. Cocoa or no, NSTextView or
no, strengths and limitations of different
approaches/languages, things to look out for, etc.)
I'll be developing on OSX 10.2.8, what sort of
limitations/compatibility issues should I be aware of
between 10.2 and 10.3?

My current vague thoughts are that I'll want to write
my own text pane object instead of using NSTextView
and that this will be the lions share of the
(conceptual) work. The other part being the program
that calls the object (which may take the lions share
of the time). I'm wondering how feasible it might be
to use a perl-ish approach for parts of the object
(w/r/t syntax highlighting, search-and-replace, etc)
or if that would make it too slow/introduce too many
dependencies.

I have work later today and all my time until then
will prolly be taken up with research for this
project, but I'm thinking I'll do a writeup for the
project sometime monday or tuesday and try to get
things in motion within the next week or two. More
information about the project's progress is liable to
be found at my website:
http://collab.freegeek.org/~wren/ . I appreciate any
and all feedback on this (especially any interest in
helping code/debug/mentor), though I'm thinking that
(unless TPTB feel it'd be a helpful discussion to have
on list) all correspondence should be directed to
phreelance@yahoo.com off-list.

Live Well,
~wren

       
Doug McNutt - 03 Oct 2004 18:29 GMT
At 07:46 -0700 10/3/04, wren argetlahm wrote:
>all correspondence should be directed to
>phreelance@yahoo.com off-list.

I'm not so sure about the OT designation.

Apple's Macintosh Programmer's Workshop (MPW) is the best programming environment I have ever used. BBEdit worksheets are a start but are not nearly as flexible. emacs is another option but it still doesn't approach MPW with its window = file metaphor. MPW allows one to execute a shell command by selecting it and using the ENTER key. Output from the command, which can be a named file or an open window, can be redirected to any other open window or to a file.

A start for an editor is Apple's TextEdit  for which Cocoa source is available.

There is still an active MPW group and there is regular talk about getting MPW carbonized for OS neXt. Apple is not responding and makes it clear that it doesn't want to and won't release the source. It is likely that you could find support for your effort on the MPW mailing list <http://lists.apple.com/mailman/listinfo/mpw-dev> especially if you are interested in making the editor a real shell while you're at it. Note that the source for tcsh is available from Debian with public license provisions.

Signature

-->  The best programming tool is a soldering iron <--

Joel Rees - 03 Oct 2004 23:23 GMT
> I'm not so sure about the OT designation.

FORTH is on topic on a perl list? ;-)

> Apple's Macintosh Programmer's Workshop (MPW) is the best programming
> environment I have ever used. BBEdit worksheets are a start but are
> not nearly as flexible. emacs is another option but it still doesn't
> approach MPW with its window = file metaphor. MPW allows one to
> execute a shell command by selecting it and using the ENTER key.

I've always wondered how much MPW was inspired by FORTH.

> Output from the command, which can be a named file or an open window,
> can be redirected to any other open window or to a file.
> ...

Let me see. IIRC, trying to run perl as an interactive shell had its
limits. But it should not be hard, I suppose, to feed a selection or
line from a text editor to an instance of perl.

I'm a little lazy right now. Was SubEthaEdit originally on open source
project?

(And did Wren notice BareBone's TextWrangler and decide that didn't go
far enough?)

One thought -- Wren, if you're going to go so far as to write YATE, I'd
suggest your internal character encoding be a thirty-two bit encoding
that uses the full thirty-two bits to allow you to keep track of input
encoding on a character-by-character basis. While Unicode support is a
must, I would not use it as an internal encoding because of the
round-trip problems.

But then I've only wren one text editor, and that was in FORTH, and not
very comprehensive.

> -->  The best programming tool is a soldering iron <--

8-O
Chris Devers - 03 Oct 2004 19:21 GMT
On Sun, 3 Oct 2004, wren argetlahm wrote:

> I apologize in advance for the off-topic nature of this posting. I've
> recently been lamenting the shortcomings of my current text editor for
[quoted text clipped - 4 lines]
> find anything in particular. So, in my infinite (lack of) wisdom I've
> decided that it might be good to write my own.

Yes, that's what the world needs: Yet Another Text Editor.

:-)

I can think of two reasons why it would make any sense to take on the
task of writing Yet Another Text Editor:

 1. You want to learn Cocoa programming. That alone is a good reason.

 2. You have some brilliant new feature in mind that can't really be
incorporated into existing software as a plugin (e.g. the network
support that SubEthaEdit provides, which doesn't seem to exist anywhere
else). This is a good idea if you really have something novel in mind,
but there's a lot of mediocre editors out there if not.

Short of those, wouldn't it make more sense to take an existing editor
that has already been ported to OSX -- Emacs & Vim spring, unbidden, to
mind here -- and learn how to extend this editor to meet your needs?

Really, there isn't much that either of Emacs or Vim can't do if you
spend the time learning them. Plus, the source for both is available, so
you can get them to do what you want -- and Vim, at least, supports Perl
as a plugin language (along with Python et al).

But please don't let me talk you out of it if this is something you
really want to do. I just think the most productive approach would be to
build on top of an existing & reasonably complete editor rather than
starting everything from scratch...

Signature

Chris Devers

Ken Williams - 04 Oct 2004 03:31 GMT
On Oct 3, 2004, at 9:46 AM, wren argetlahm wrote:

> I apologize in advance for the off-topic nature of
> this posting. I've recently been lamenting the
[quoted text clipped - 7 lines]
> of) wisdom I've decided that it might be good to write
> my own.

If you want to write one because you think it'll be fun, okay.

But if you want to write one because you think you'll save money:
suppose you earn about $40/hour.  BBEdit upgrade costs about 60 bucks.  
Do you think it'll require more than one and a half hours of your time
to write something better for your needs than BBEdit?

 -Ken
Wren Argetlahm - 04 Oct 2004 08:28 GMT
(Replying to all the messages in one)

I guess right now I'm mainly looking for a good (to a
certain extent, read: dedicated) XML editor and
haven't yet encountered one for OSX. Aside form the
"standard" text editor features, the two biggest
things I'm looking for are automatic (via keystroke)
closing element tags* and highly extensible syntax
highlighting.

I've been told that jEdit performs excellently at the
latter, but haven't had a chance to test it out yet.
One of the big things I'm looking for is the ability
to use multiple highlighting pragmas in the same file
(i.e. CSS embedded in HTML, JS in HTML, PHP in HTML,
XSLT in XML, HTML in XML (aka XHTML), et cetera).

* And other carpal-tunnel-avoiding/time-saving
mechanisms like block indent/outdent/commenting and
"tab completion" ala emacs' dabbrev-expand

--- "Chris Devers" wrote:
> Yes, that's what the world needs: Yet Another Text
Editor.

But of course :-)

> I can think of two reasons why it would make any
sense to take on the
> task of writing Yet Another Text Editor:
>
>   1. You want to learn Cocoa programming. That alone
is a good reason.

>   2. You have some brilliant new feature in mind
that can't really be
> incorporated into existing software as a plugin

I hadn't thought of it as a Cocoa-learning exercise,
though it would definitely be that. jEdit may break
the mold, but historically speaking all the text
editors I've used suffer from the limitation that they
can only really handle one set of syntax for the whole
file, and tend to fall apart with these "mixed"
content files; sometimes they'll be able to handle it
to some extent, but by and large it comes across as
kludgeish (e.g. defining CSS/JS/PHP as part of the
HTML syntax). While not the end of the world, "it
would be nice..." And, I mean I could use vim, it has
pretty good highlighting abilities, but it'd be nice
to get something good and Mac-ish. If after trying
jEdit I do decide to go ahead with the project I think
this may be The Big Feature to make it a worthwhile
editor: a way of having the file actually be
interpreted in different languages as appropriate. Not
just for highlighting but also for validation,
spellchecking (e.g. only check the text nodes on a
webpage rather than calling the tags misspellings),
tag/quote/curly-brace/parens/... closing, doing block
commenting with the right comment-symbols.

I don't know if that'd count as "brilliant". It would
save a lot of time/energy to build on top of another
editor, and that would reduce the overall number of
editors out there, but I'd find it difficult to do the
sorts of things I'm thinking as a module since it
alters the underlying way text is handled.

--- "Doug McNutt" wrote:
> I'm not so sure about the OT designation.

Since Perl is what I know, and Perl is really good
with text I've been debating possible Perl-oriented
approaches. But I'm wondering why you're not so sure
about the OT designation?

> It is likely that you could find support for your
effort on the MPW
> mailing list <
http://lists.apple.com/mailman/listinfo/mpw-dev >
> especially if you are interested in making the
editor a real shell
> while you're at it.

Depending on what all this "real shell" entails, I may
very well be interested. Ideally the end product would
have good integration with commandline programs (such
as `wc` and others I can't think of off the top of my
head, ability to run scripts/programs and direct
output to a window, etc). I've never messed with MPW,
mind, so who knows if what I'm hoping for would bear
much resemblance to it.

--- "Joel Rees" wrote:
> I'm a little lazy right now. Was SubEthaEdit
originally on open source
> project?
>
> (And did Wren notice BareBone's TextWrangler and
decide that didn't go
> far enough?)

I don't know if SEE was ever open source. For some
reason I'm thinking not, though I don't know where
that's coming from. If it is/was F/OSS I would be
interested in borrowing the network editing stuff (if
feasible) since that is what everybody cites it for. I
find the idea nifty even though I've never used it
myself and don't know if I ever will; but the overall
lack of preferences/customizability of SEE is one of
the big things turning me off of it right now.

I looked at TextWrangler a looong time back. I don't
remember much of anything about it. Of course one of
the things keeping me away from BBEdit is the cost, is
BBTW substantially cheaper or better yet F/OSS?

> One thought -- Wren, if you're going to go so far as
to write YATE,
> I'd suggest your internal character encoding be a
thirty-two bit
> encoding that uses the full thirty-two bits to allow
you to keep track
> of input encoding on a character-by-character basis.
While Unicode
> support is a must, I would not use it as an internal
encoding because
> of the round-trip problems.

The idea intrigues me, but I think I may be a bit too
naive about character encoding to get precisely what
you mean. What aspect of "input encoding" are you
intending? And which round-trip problems are you
referring to?

> But if you want to write one because you think you'll save money:
> suppose you earn about $40/hour.  BBEdit upgrade costs about 60 bucks.

IIRC my version of BBEdit is sufficiently old that I
can't upgrade it but must buy it anew. Of course, at
the moment I have no disposable income, but I do have
free time, which tilts the equation. In any case, if I
had the money I'd prolly get it, but on a certain
level I do think it'd be fun to do, especially if I
can get it to have the features I'm looking for. I've
also been getting quite into the whole F/OSS issue of
late, and should I ever actually take the time to
reflect on the matter, some part of me feels that I
should practice what I preach. <shrug/>

~wren

       
Pete Prodoehl - 04 Oct 2004 13:36 GMT
wren argetlahm wrote:
> (Replying to all the messages in one)
>
[quoted text clipped - 12 lines]
> (i.e. CSS embedded in HTML, JS in HTML, PHP in HTML,
> XSLT in XML, HTML in XML (aka XHTML), et cetera).

Take the time to look at jEdit then, as it's pretty darn extensive, and
what it might not do, there is probably a plugin or macro to do...

Pete
Chris Devers - 04 Oct 2004 14:45 GMT
On Mon, 4 Oct 2004, wren argetlahm wrote:

> And, I mean I could use vim, it has pretty good highlighting
> abilities, but it'd be nice to get something good and Mac-ish.

Maybe I should have clarified that Emacs and Vim came, unbidden, to
mind, because both of them already have nice GUI Mac versions.

I happen to prefer Vim, and use that as my main editor in most cases,
but a case could be made that Emacs is already pretty "Mac-ish", in that
a lot of Cocoa applications support Emacs keybindings to begin with. Try
it out in, say, a text box in Safari: ^a jumps to the start of a line,
^e jumps to the end, ^d deletes the character to the right, ^h deletes
the character to the left, etc. As I understand it, anything written
using the Cocoa libraries gets this for free, and it will be immediately
familiar to anyone that knows Emacs (or readline, bash, pine, etc).

Plus, if you come up with useful extensions to these editors, they will
be useful to people on other operating systems, so you automatically get
a larger pool of people who can take your ideas, run with them, and send
any improvements they can come up with back to you.

As for whether Vim or Emacs can handle different regions of a file in
different ways, I've never looked for that feature, but there may be
discussion of it in the vim-users list, or [insert Emacs equivalent
mailing list here], or other documentation for those editors. If the
functionality doesn't exist, I'm sure it's something that would be
useful to lots of people...

Signature

Chris Devers

Jeff Lowrey - 04 Oct 2004 17:00 GMT
I'd suggest looking at Eclipse.  It's free, and should have all the XML
editing goodness you're looking for, and should support the web development
kinds of things as well.

-Jeff
David Jantzen - 04 Oct 2004 22:21 GMT
It's not just a text editor, but you might try Eclipse with the  
XMLBuddy plugin.

   
http://www.eclipseplugincentral.com/Web_Links+index-req-viewlink-cid
-91.html

On Oct 4, 2004, at 12:28 AM, wren argetlahm wrote:

> (Replying to all the messages in one)
>
[quoted text clipped - 155 lines]
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail
Pete Prodoehl - 04 Oct 2004 13:40 GMT
> On Oct 3, 2004, at 9:46 AM, wren argetlahm wrote:

>> (SubEthaEdit since my copy of BBEdit is Classic and a
>> new one costs way to much for my budget).

> If you want to write one because you think it'll be fun, okay.
>
> But if you want to write one because you think you'll save money:
> suppose you earn about $40/hour.  BBEdit upgrade costs about 60 bucks.  
> Do you think it'll require more than one and a half hours of your time
> to write something better for your needs than BBEdit?

You assume he needs only one copy of BBEdit... Combining the Macs I have
at home, and the ones I use at work is about 5 machines (not to mention
the non-Mac computers I use.) I'm assuming I'd need licenses for each
machine if I went with BBEdit, right? Instead I'm using an open-source
editor on all machines and not spending $200 on licenses. Don't get me
wrong, BBEdit is a great editor, but it doesn't fit my needs, which is a
text editor that I can install on all of my computers, regardless of OS,
 for a reasonable price.

Pete
Randal L. Schwartz - 04 Oct 2004 13:59 GMT
>>>>> "Ken" == Ken Williams <ken@mathforum.org> writes:

Ken> But if you want to write one because you think you'll save money:
Ken> suppose you earn about $40/hour.  BBEdit upgrade costs about 60 bucks.
Ken> Do you think it'll require more than one and a half hours of your time
Ken> to write something better for your needs than BBEdit?

Hell, Emacs is Free.  How long do you have to work to write an editor
better than emacs, making no money doing it? :-)

Signature

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Wren Argetlahm - 05 Oct 2004 01:45 GMT
--- "Randal L. Schwartz" <merlyn@stonehenge.com>
wrote:
> Hell, Emacs is Free.  How long do you have to work
> to write an editor
> better than emacs, making no money doing it? :-)

:-)  It's been a long time since I've tried out emacs,
the discovery of dabbrev-completion makes it sound...
tempting, but I remember back when first introduced to
*nix and was functionally told I must learn either
vi(m) or emacs, that emacs baffled me and I could
never get it to do anything I wanted, whereas
vim--though bizzare--I could at least get to do what I
wanted it to after reading the
documentation--documentation I had available for emacs
at the time was either non-existant or
non-educational.

~wren

       
Randal L. Schwartz - 05 Oct 2004 16:05 GMT
>>>>> "Wren" == Wren Argetlahm <phreelance@yahoo.com> writes:

Wren> documentation I had available for emacs
Wren> at the time was either non-existant or
Wren> non-educational.

The built-in tutorial, followed by reading the docs until it
gets boring, are both pretty good already.  And there's been some
good third-party books as well.

Signature

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

John Delacour - 04 Oct 2004 08:27 GMT
At 7:46 am -0700 3/10/04, wren argetlahm wrote:

>  So, in my infinite (lack of) wisdom I've decided that it might be
>good to write my own.

Have you considered Alpha?  <http://alphatcl.sourceforge.net/>
Wren Argetlahm - 04 Oct 2004 08:34 GMT
> At 7:46 am -0700 3/10/04, wren argetlahm wrote:
>
[quoted text clipped - 3 lines]
> Have you considered Alpha?
> <http://alphatcl.sourceforge.net/>

I have not, this is the first I've heard of it.
Admittedly I find the wiki a bit difficult to
navigate; what are the strengths of it (or a URl to
such a description)?

~wren

       
Celeste Suliin Burris - 05 Oct 2004 18:32 GMT
Actually, BBEdit takes a pretty liberal view. I actually called them one time to see if they had a "multiple copy" discount, since I have 3 computers, and they said I really only needed two, since I am the only user of the laptop and one of the desktops.

I actually tried Emacs. I'm a Solaris Sysadmin, and it was way too counterintuitive. I quickly returned to VI. The learning curve on BBEdit is such that you can be productive the first time you open a file, but you continually discover "a better way to do it".

If you INSIST on free, try vim (http://www.vim.org) or NEdit (http://www.nedit.org/).

-----Original Message-----
From: Pete Prodoehl <pete.prodoehl@cygnusinteractive.com>
Sent: Oct 4, 2004 5:40 AM
To: MacPerlOSX <macosx@perl.org>
Subject: Re: [OT] Text Editor for OSX

Ken Williams wrote:
> On Oct 3, 2004, at 9:46 AM, wren argetlahm wrote:

>> (SubEthaEdit since my copy of BBEdit is Classic and a
>> new one costs way to much for my budget).

> If you want to write one because you think it'll be fun, okay.
>
> But if you want to write one because you think you'll save money:
> suppose you earn about $40/hour.  BBEdit upgrade costs about 60 bucks.  
> Do you think it'll require more than one and a half hours of your time
> to write something better for your needs than BBEdit?

You assume he needs only one copy of BBEdit... Combining the Macs I have
at home, and the ones I use at work is about 5 machines (not to mention
the non-Mac computers I use.) I'm assuming I'd need licenses for each
machine if I went with BBEdit, right? Instead I'm using an open-source
editor on all machines and not spending $200 on licenses. Don't get me
wrong, BBEdit is a great editor, but it doesn't fit my needs, which is a
text editor that I can install on all of my computers, regardless of OS,
 for a reasonable price.

Pete
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.