EmbeddedRelated.com
Forums

Editor recommendation

Started by Roberto Waltman August 28, 2013
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> writes:
>> I have had rectangular cut and paste ever since I began >> using my own editor (around 1990), > Emacs has it, but I don't know when Emacs acquired it.
Probably in the 1970's on the PDP-10.
Hi Roberto,

On 8/29/2013 7:01 AM, Roberto Waltman wrote:
> Pity the new Brief doesn't have the original's macro language. (I used > it extensively in the DOS days. )
I found the ease of creating a "keystroke macro" to be the most useful tool! Typically, I would create two windows into the same file (most often one above the other -- but depends on the actual nature of the task I was trying to perform). The top window would usually be what I considered the "source" window and the bottom, the "destination". I would *carefully* position the cursors in each window where I wanted them to be -- "initial source" and "initial destination". Then, in the source window, "begin" the keystroke macro and carefully execute some set of cursor positioning, mark, search, etc. keystrokes. Switching to the "window below" and taking advantage of whatever I had "cut" or copied in the window above to paste, overwrite/insert into the lower window. Then, return to the "window above" for any additional steps that needed to be performed there. Back to the lower window, etc. Once done, "end" the macro (taking care to make sure the cursors in the source and destination windows are positioned appropriately so this stored set of keystrokes could be applied to the *next* source instance (line, field, etc.). Then, lean on the "play keystroke macro" command and watch the two windows scroll along as the cursor frenetically jumps around applying the stored actions. I found this *so* easy to do that it was the *first* technique I would often apply -- even if there might have been some more clever way of doing what I wanted. Esp as it would let me *see* the changes being applied ("Ooops! I guess I don't really want to apply this for the entire extent of the file! Best stop here and undo back to where I *should* have stopped!")
> By "still supported", I meant "bugs are fixed" > > No CVS integration needed.
It's interesting to see the different attitudes tools take towards their "associates"! I.e., does the editor invoke the VCS toolkit? Or, does the VCS toolkit invoke the *editor*?? Everyone always wants to drive the bus... I've been setting up a Perforce server for one of the projects, here. Needless to say, they want to think the world revolves around *them*!
> Working under windows when at work.
And *only* dealing with "source code"? E.g., I find it tedious having to bounce around between different toolchains where different capabilities are present -- or, invoked/implemented in slightly incompatible ways (hence liking the ability to be able to resort to something as banal as vi(1) as needed).
> I don't want my spaces replace by tabs either ;) > > Will give a try to Eclipse again, although don't like the screen real > state it uses in things other than the files edited.
That's one advantage to using, e.g., vi(1) in separate xterm(1)s under X. Very little "wasted" real estate for "button bars", status fields, etc. Likewise, a no-frills window manager so you don't have lots of decorated window frames! [I have xterm(1) configured so I can easily change font sizes in individual sessions -- though that currently also changes the window geometry]
> Specially when I need to use larger and larger fonts as time goes by. > (Not everybody has dual 30" monitors.) And what was that Saturn-like > icon for?
Be thankful you're just writing code! When preparing publications, you want to see a good fraction of the page (to get a feel for how it lays out, etc.) which drives text size down. Yet, you still want to be able to resolve different typefaces/styles conveniently ("is that italics? or, just excessive jaggies from the lowered relative resolution??") There comes a point where you just can't get a monitor *big* enough!! :-/
On Thursday, August 29, 2013 8:49:12 PM UTC+3, Simon Clubley wrote:
> On 2013-08-29, dp <dp@tgi-sci.com> wrote: > > On Thursday, August 29, 2013 8:15:24 PM UTC+3, Simon Clubley wrote: > >> > >> I've no need for moving up/down in units of 4 lines, > >> ... > > > > How do you move vertically when you have to do it for long distances? > > To me, shift-cursor up or down is may be the most frequently > > used combination. > > > > > > Page up/page down, which is really screen up/screen down as it jumps in > units based on the terminal emulator/GUI window length (minus some > configurable overlap so you don't lose your place while scrolling > through the code).
Well I have page up and page down as well of course, and I also use these extensively. But moving say 25-30 lines up within a 50 line page is incomparably faster/easier to do using the *4 cursor up (it takes having used both to know how useful both are). So the world has only partially caught up, as it turns out :-). Dimiter ------------------------------------------------------ Dimiter Popoff Transgalactic Instruments http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/
In article <kems19dsqi8b4s4m1gcfm3ilgd48au2v5q@4ax.com>,
Roberto Waltman  <usenet@rwaltman.com> wrote:

>What editor would you recommend for code development? >Looking for something that understands C & C++ syntax, can define >projects, run external compilations, etc. and has active support.
Joe's Own Editor: http://joe-editor.sourceforge.net/ -- /* jhallen@world.std.com AB1GO */ /* Joseph H. Allen */ int a[1817];main(z,p,q,r){for(p=80;q+p-80;p-=2*a[p])for(z=9;z--;)q=3&(r=time(0) +r*57)/7,q=q?q-1?q-2?1-p%79?-1:0:p%79-77?1:0:p<1659?79:0:p>158?-79:0,q?!a[p+q*2 ]?a[p+=a[p+=q]=q]=q:0:0;for(;q++-1817;)printf(q%79?"%c":"%c\n"," #"[!a[q-1]]);}
Hey Don,

> ... > In school (late 70's), forward/backward word/line/etc. was > a common feature on the (numeric) keypad on one of the > DEC?
Well my first keyboard did have cursor keys and they have always been functioning :-). But to have shift multiply the effect of up/down keys (among others) by 4 (or whatever one feels is OK) was not - I introduced it in my first editor, don't know who if anyone has done it before on which platform. It is very convenient to have it. One of the most enjoyable features I have found is being able to set the "cursor direction". I first saw this feature on The Electric Blackboard (under CP/M).
> ... > Basically, you defined the direction in which the cursor would > move after each keystroke. One of the more common uses was to > move over to some column where on-line comments began (e.g., ~40) >set the cursor direction to *down* and then lean on, for example, > ';' (to introduce comments). > > This would have the effect of inserting (or replacing, depending > on which mode you were in) a semicolon in column 40 of each line > that you passed *through*.
In my editor I do this by edit/copying a column which I want to multiply, then I "paste" it (usually in replace mode) where I want it. Usually I start with a 4 line column, once I duplicate it another two keystrokes double it etc., can get as fast as needed.
> > Sorry for the OT as I can't recommend any of the PC based > > editors but sometimes like all of us I also need to talk > > to people who understand what I am talking about :-). > > Hope Lucy isn't reading over your shoulder!! :>
Hah, she would not mind that I am sure :D. She is pretty far from doing that sort of thing (but she is quite good at learning to use new gadgets). Dimiter ------------------------------------------------------ Dimiter Popoff Transgalactic Instruments http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/
Hi Dimiter,

[I sent you a msg a week or two ago... perhaps wrong email addr?]

On 8/29/2013 2:04 PM, dp wrote:

>> Basically, you defined the direction in which the cursor would >> move after each keystroke. One of the more common uses was to >> move over to some column where on-line comments began (e.g., ~40) >> set the cursor direction to *down* and then lean on, for example, >> ';' (to introduce comments). >> >> This would have the effect of inserting (or replacing, depending >> on which mode you were in) a semicolon in column 40 of each line >> that you passed *through*. > > In my editor I do this by edit/copying a column which I want to > multiply, then I "paste" it (usually in replace mode) where I want > it. Usually I start with a 4 line column, once I duplicate it another > two keystrokes double it etc., can get as fast as needed.
I think the "cursor direction" feature is more intuitive -- once you get used to it. E.g., to number consecutive lines, you simply point down and type "012345678901234567890...". Then, move left a column and invoke "repeat 10 X" (where X is 0, then 1, then 2, etc.) Applies equally well to "numbering" lines with letters. Or, in different radix: 0123456701234567... At the time (coming from more "conventional" editors -- qedx, teco, etc.) it was a delightful feature (on a 6MHz 8b "workstation"!) My best friend was very fond of writing macros -- for all sorts of little things. Of course, that meant he then had to keep track of all of these and how to invoke each, what they did, etc. I much prefer a behavior that I can observe and intuitively apply in different scenarios. Much like the "copy two lines; then four; then eight; etc."
>>> Sorry for the OT as I can't recommend any of the PC based >>> editors but sometimes like all of us I also need to talk >>> to people who understand what I am talking about :-). >> >> Hope Lucy isn't reading over your shoulder!! :> > > Hah, she would not mind that I am sure :D. She is pretty far > from doing that sort of thing (but she is quite good at learning > to use new gadgets).
Isn't that a prerequisite, when living with an engineer? :> C complains each time I make some change in "how things work". Of course, I've only done so to *fix* something that wasn't working properly at the time or to add some functionality -- often that *she* requested! :-/ ("Why can't I get the DVD player to work?" "Because you asked me to hook up a VCR last night so you could watch that video of your family!" "Oh. <shamed pause> So, how do I get the DVD to play, now?") (sigh) Can't win... --don P.S. I will assume it is *finally* above 0C there? :> (we're *dropping* to the very high 30's)
On Thu, 29 Aug 2013 12:04:40 -0700, Don Y <this@isnotme.com> wrote:

>Hi Roberto, > >On 8/29/2013 7:01 AM, Roberto Waltman wrote: >> Specially when I need to use larger and larger fonts as time goes by. >> (Not everybody has dual 30" monitors.) And what was that Saturn-like >> icon for? > >Be thankful you're just writing code! When preparing publications, >you want to see a good fraction of the page (to get a feel for how >it lays out, etc.) which drives text size down. Yet, you still want >to be able to resolve different typefaces/styles conveniently >("is that italics? or, just excessive jaggies from the lowered >relative resolution??") > >There comes a point where you just can't get a monitor *big* >enough!! :-/
A second video card and a 24 inch monitor in portrait mode will set you back, what, $200?
Hi Robert,

On 8/29/2013 2:31 PM, Robert Wessel wrote:
> On Thu, 29 Aug 2013 12:04:40 -0700, Don Y <this@isnotme.com> wrote: > >> On 8/29/2013 7:01 AM, Roberto Waltman wrote: >>> Specially when I need to use larger and larger fonts as time goes by. >>> (Not everybody has dual 30" monitors.) And what was that Saturn-like >>> icon for? >> >> Be thankful you're just writing code! When preparing publications, >> you want to see a good fraction of the page (to get a feel for how >> it lays out, etc.) which drives text size down. Yet, you still want >> to be able to resolve different typefaces/styles conveniently >> ("is that italics? or, just excessive jaggies from the lowered >> relative resolution??") >> >> There comes a point where you just can't get a monitor *big* >> enough!! :-/ > > A second video card and a 24 inch monitor in portrait mode will set > you back, what, $200?
I already have six 21" monitors in the office -- two on each workstation. Rotate one to have the aspect ratio of a "sheet of paper" when working on documents -- the other can remain "as is" to interact with the associated applications. The problem with larger monitors is you need them further away in order to see the page as a whole. Then, the added detail gets lost (vision degrades with age). I've found it much more productive to *print* the pages of interest and examine them in my hands. Your eyes are very capable of resolving fine detail WHEN CALLED UPON (they are also very good at *ignoring* fine detail when necessary!). Print a page at 1200dpi (even 600dpi for proofs) and you can get a much better feel for the "product" than a 21 (or 24!) inch monitor operating at a resolution of 7000 pels or greater, vertically! [There's a reason folks typeset documents at "magnified scale"... you just can't see that sort of fine detail on commercial monitors at 1:1! *I* "cheat" a lot! altering the colors associated with certain tags so that I can rely on color cues in lieu of being able to have a high degree of visual acuity. E.g., perhaps arranging for "emphasis" text (possibly italic?) to be displayed in green -- as well as in the required typeface -- so that the color cue frees me from having to question whether a particular glyph has some slant/skew/boldness to it or not]
On Thu, 29 Aug 2013 14:25:10 -0700, Don Y <this@isnotme.com> wrote:

>Hi Dimiter, > >[I sent you a msg a week or two ago... perhaps wrong email addr?] > >On 8/29/2013 2:04 PM, dp wrote: >> Hah, she would not mind that I am sure :D. She is pretty far >> from doing that sort of thing (but she is quite good at learning >> to use new gadgets). > >Isn't that a prerequisite, when living with an engineer? :> > >C complains each time I make some change in "how things work". Of >course, I've only done so to *fix* something that wasn't working >properly at the time or to add some functionality -- often that >*she* requested! :-/ > >("Why can't I get the DVD player to work?" "Because you asked >me to hook up a VCR last night so you could watch that video >of your family!" "Oh. <shamed pause> So, how do I get the >DVD to play, now?") > >(sigh) Can't win...
ITYM, "The person who bought the TV (or receiver) didn't get one with enough A/V inputs".
On Friday, August 30, 2013 12:25:10 AM UTC+3, Don Y wrote:
> Hi Dimiter, > > > [I sent you a msg a week or two ago... perhaps wrong email addr?]
Never got one. It is possible if you have sent it to the address I use to post here (dp@... ) that I have just overlooked it, I get a few hundred messages/day on it, almost all spam. Use some of the others if that's the case or please just retry it, me not seeing it is very low chance even at this address.
> On 8/29/2013 2:04 PM, dp wrote: > > >> Basically, you defined the direction in which the cursor would > >> move after each keystroke. One of the more common uses was to > >> move over to some column where on-line comments began (e.g., ~40) > >> set the cursor direction to *down* and then lean on, for example, > >> ';' (to introduce comments). > >> > >> This would have the effect of inserting (or replacing, depending > >> on which mode you were in) a semicolon in column 40 of each line > >> that you passed *through*. > > > > In my editor I do this by edit/copying a column which I want to > > multiply, then I "paste" it (usually in replace mode) where I want > > it. Usually I start with a 4 line column, once I duplicate it another > > two keystrokes double it etc., can get as fast as needed. > > I think the "cursor direction" feature is more intuitive -- once > you get used to it.
It is more intuitive indeed, but once you get used to the "mark and duplicate" method I have you get much faster when it comes to larger quantities. Imagine you want to do it on 200 or 2000 lines; chances are you will just look for an alternative method rather than moving the cursor over each line. The way it works for me is to mark the top of the duplicated column(s) and once I duplicate I mark the entire column again, so each time I "paste" I have it duplicated and can also duplicate what I have to paste. So if I start with 4 lines after repeating alt-m F3 alt-i 6 times I will have done 256 lines (unless I miscalculate, give or take 1 repetition). Then the column I insert/replace can contain anything and be of any width/height.
> E.g., to number consecutive lines, you simply point down > and type "012345678901234567890...". Then, move left a column > and invoke "repeat 10 X" (where X is 0, then 1, then 2, etc.)
Well it is a way of doing it of course. My way is to make the first ten lines manually, then copy it as many times as it takes, perhaps multiplied. I suppose your method would be a bit faster for 10-20 lines, mine would probably be faster above that. But these are things we rarely do anyway. It is important to have them easily available so editor inconveniences do not make us avoid doing what we really want to though. I suppose the little things are the great time savers though, like that move(scroll) 4 lines instead of one if shift is down, move to next/previous word, delete from cursor back to word start (that would be alt-left for me), delete from cursor until next word (alt-right), erase to EOL (ctrl-right) etc. etc., things we do hundreds if not thousands of times a day.
> > At the time (coming from more "conventional" editors -- qedx, > teco, etc.) it was a delightful feature (on a 6MHz 8b "workstation"!)
I did my first text editor for my 2 MHz 6809 machine I had made. Two 6809-s, actually; a "system" board and a "text/graphics terminal" board, an 8 bit wide 1k FIFO between the two. I replicated the keys on the second which is still the DPS system text editor I use all the time (now running on a 400 MHz power, actually can run multiple instances also of an emulation I did of the 6809 machine under DPS. Obviously I added some new features then; time for yet another overhaul now that we are at it :D.
> > >>> Sorry for the OT as I can't recommend any of the PC based > >>> editors but sometimes like all of us I also need to talk > >>> to people who understand what I am talking about :-). > >> > >> Hope Lucy isn't reading over your shoulder!! :> > > > > Hah, she would not mind that I am sure :D. She is pretty far > > from doing that sort of thing (but she is quite good at learning > > to use new gadgets). > > Isn't that a prerequisite, when living with an engineer? :>
Hmm, I am not sure which I would prefer :D . This way when a gadget (her laptop or the smartphone) is messed up in some way guess who has to be available to fix things. Come to think of it I am so used to being that guy that I don't even question if I have to do it, whoever it is I have to rescue :D .
> > C complains each time I make some change in "how things work". Of > course, I've only done so to *fix* something that wasn't working > properly at the time or to add some functionality -- often that > *she* requested! :-/
Well that sort of thing is similar here of course. Add to that that Lucy often has to cope with system popup messages in English which she more often than not does not understand... :D .
> > ("Why can't I get the DVD player to work?" "Because you asked > me to hook up a VCR last night so you could watch that video > of your family!" "Oh. <shamed pause> So, how do I get the > DVD to play, now?")
Most of the time when I make that sort of changes Lucy is alert and watching me,
> > P.S. I will assume it is *finally* above 0C there? :> > (we're *dropping* to the very high 30's)
Tell me about it. Summer is going to an end, we had only 6-7 weeks of real summer (should have had 3-4 months). But it is still summerish, hopefully for some time more. Dimiter ------------------------------------------------------ Dimiter Popoff Transgalactic Instruments http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/