From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10b05a,eebc048575b82884 X-Google-Attributes: gid10b05a,public X-Google-Thread: 107393,62951c700994df34 X-Google-Attributes: gid107393,public X-Google-Thread: fee84,62951c700994df34 X-Google-Attributes: gidfee84,public X-Google-Thread: f9400,62951c700994df34 X-Google-Attributes: gidf9400,public From: joshi@sal.cs.uiuc.edu (Anil Joshi) Subject: Re: Unix editors w/features for dealing with columnar data? Date: 1995/05/01 Message-ID: <3o3fjv$ens@vixen.cso.uiuc.edu>#1/1 X-Deja-AN: 101876963 distribution: inet references: <3nr6nl$cak@news.iastate.edu> <3o33l5$l91@senator-bedfellow.MIT.EDU> organization: University of Illinois at Urbana newsgroups: comp.editors,comp.os.ultrix,comp.unix.osf.osf1,alt.lang.s-lang davis@space.mit.edu writes: > > Find the lines that have '1234' in columns 1-4 and change > > columns 30-35 to 'abcdef'. >There are many ways to do this using JED. For example, one could use >regular expression searches, keyboard macros, etc... However, if this is a >routine task, I suggest something like the following function: > define solution_1 () > { > push_spot (); % save position > bob (); % goto beginning of the buffer > while (bol_fsearch ("1234")) > { > goto_column (30); > deln (6); > insert ("abcdef"); > } > pop_spot (); % goto original position > } There seems to be a misunderstanding here. Unless JED has the kind of column manipulations that are possible as in XEDIT, ISPF or THE, this kind of manipulation is hard only through regular expressions. Added to that, you are asking the users to "program". Leaving that aside, let me ask for a slightly different kind of a thing. What if the id number is columns 21-24 instead of 1-4? I don't know JED but am guessing that bol_search searches from the beginning of the line. There are somethings that I sorely miss in the (two most popular) unix editors which are very useful in a variety of situations - 1. "x"clude lines 2. Setting left and right margins aka ISPF editor 3. Floating Ruler 4. Mask lines Anil -- Sathsangatve nissangatvam From good company to no company Nissangatve nirmohatvam From no company to lack of desire Nirmohatve nischalatatvam From lack of desire to concentration of mind Nischalatatve jeevanmuktihi From concentration of mind to liberation of life