Skip to content
Prev 3011 / 15075 Next

built-in editor underlining

Simon, 

this is getting a more and more interesting thread, isn't it?


Am 18.09.2006 16:31 Uhr schrieb Simon Urbanek
(<simon.urbanek at r-project.org>):
Well, this may be partly because people think that you already have enough
work to do...
You may consider to try the demo, as a source of inspiration (?).
Try to have a look at these huge text fields BBEdit's/TextWrangler's search
& replace-dialog offers, incl. RegEx highlighting. Did you ever try to enter
a complex RegEx in one of that simple one line search/replace fields?
Horrible.
Both, and more. Jumping points/marks are useful sometimes. (BTW, BBEdit has
no built-in R-syntax support in the version I use, so it has no "jump to
function xy/next function/etc.", but that can be added with AppleScript. But
then, you still don't have a function popup or something similar for R-code
in v7, but with v8 or v8.5 this should work, I guess).
But back to your question. I can have a windows palette open (since v8 it's
a drawer, I think) and navigate with command-# to window 0-9, or pick the
file I want with a click on its entry. I prefer this to diving into a menu.
Bulk save, bulk close, too.
I can use window splitting -- I'm not the greatest fan of this feature, but
sometimes it helps to be a bit closer to the "big picture". Navigation in
this respect means, having different parts of the relevant code right in
front of you. 
I already mentioned RegEx searching through folders, which enhances
navigation, too, of course. I can pick a document in a search result list.
(Well, that should be enough, I'll stop before I'm getting too verbose
again.)
What exactly is AT? Sorry for the dumb question.
Automation is ... well, a lot. Doing [bulk] search-replaces with AppleScript
and/or Automator and/or Perl filters, directly on a whole set of files, or
on selected text. Programmatically restricting such actions to specific
files in specific folders. Setting up new packages or projects, including
customized architectures (read: file- & folder hierarchies).  Controlling
and setting encodings, and syntax highlighting (Tcl for R-syntax; XML, ...).
Looping through open R-scripts and pasting specific code templates; doing
checks similar, but somewhat different to what 'R CMD check' does ... There
are dozens of others possibilities, most of them more complex. AppleScript
isn't that bad, and BBEdit has extensive AS support. AppleScript stands for
application automation *and integration*, and that's the most interesting
part for me. Another Mac user pointed me to sending selected code blocks
from BBEdit to R.app via AppleScript, and let the latter execute that code.
That's great, and somewhat simplifies the cycle of edit-source-edit (e.g.,
no navigation in R.app's command history needed, selectively executing code
snippets, shorter execution times).
You could argue that some of this is a weird way to work (sometimes that's
what *I* think LOL) -- for me it makes sense, and saves time and brain
cells. Or you could argue that there are other ways to accomplish the same.
Yes, without a doubt, but I like it this way. But I'm open to any
improvement, I fear I'm an ecclectic... ;)
Instant text, snippets. "Glossary" in the old version, "Clippings" in the
new. Common German term is "Textbausteine".
It is, absolutely. And BBEdit has a palette for this kind of stuff, too.
Configurable in extenso, script files to feed it are stored in "Application
Support", it can have nested subsections, it's Alias-aware, you can assign
keyboard shortcuts to single scripts, etc.
Sorry that I said that "palette"-word again -- I know, not everyone is a fan
of palettes. For me, often used actions are just a click away, and that's
why I like them in BBEdit.
BTW, what about a configurable palette for R-scripts in R-app? Logic: Set up
your palette (project-wise changing, or for the rest of your days), and
execute your R-scripts with a click. A palette for the command history would
be VERY useful, too. (You see, the horror starts as soon as you ask people
to be creative ;-)
Pleased to hear, though I fear it's a LOT of work.
A question of feeling, or self-assessment?
No, seriously, I'm just beginning to learn R and figure out how things work
-- that's the beginner's part. But I know (more or less) what I want to
achieve, I have some experience with Perl and AppleScript, and SQL, a bit
XML/XSLT, and of course an elaborated personal style of working. Take it
with a grain of salt -- my skills are only half-cooked, I'm not a trained
programmer. 
But I made an interesting experience, repeatedly during the years: I try to
use what a program offers. If it has power features, they are there for a
reason, and I try to find out, in which respect this or that could be useful
for my own work, and adopt what I need. Step by step. Power features can
make beginners become power users, if they are available. Makes sense?
That's a great attitude, Simon, respect.
The point is, I'm simply looking for the tools to get my work done. If I
find that BBEdit-or-whichever-app falls short, I stop to use it and switch
to the better fitting alternative.

Okay, enough for now. I'm sure that many people here are glad to have R and
R.app for OS X, and will certainly advocate and advertise both whenever they
can. We're here because we *need* this software, and we appreciate your
efforts. 

Sorry for the horrible English. I tend to call it "experimental", from time
to time ;) 

Cheers, 
J?rg