home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.editors
- Path: sparky!uunet!comp.vuw.ac.nz!ferrari.datamark.co.nz!david
- From: david@datamark.co.nz (David Rowland)
- Subject: Re: Arbitrary text blocks (Was: VI??? GROSS!)
- Message-ID: <1992Nov17.205808.18435@datamark.co.nz>
- Date: Tue, 17 Nov 1992 20:58:08 GMT
- References: <1992Nov16.065935.27173@rc.nokia.fi> <1992Nov16.221338.42264@datamark.co.nz> <1992Nov17.145011.24541@Princeton.EDU>
- Organization: Datamark International Ltd.
- Lines: 73
-
- In article <1992Nov17.145011.24541@Princeton.EDU> bvaughan@sheps.Princeton.EDU (Barbara Vaughan) writes:
- >In article <1992Nov16.221338.42264@datamark.co.nz> david@datamark.co.nz (David Rowland) writes:
- >>
- >>I agree. I though vi was used for editing programs and text files. If
- >>any one is looking for something which allows selecting rectangle
- >>blocks and columns, shouldn't they be using a word processor or a
- >>spread sheet???
- >>
- >
- >Back in the days when I mostly worked with MSDOS and had a good editor
- >that handled rectangular blocks easily, I used to use it to prepare data
- >so I COULD read it into a spreadsheet or word processor. For instance, if
- >I have a file of formatted data:
- >
- >123456789
- >987654321
- >
- >I can use my editor to insert a column of blanks in front of each field so
- >it can be read into a spreadsheet program:
- >
- >12 34 56 78 9
- >98 76 54 32 1
- >
-
- A simple QBasic program will do this job nicely now-a-days.
-
- >Or if I have some ugly SPSS CROSSTAB output, where cells are separated by
- >dashes, plus signs and vertical bars:
- >
- > 1 | 23 |
- >-----+----+
- > | |
- > 3 | 45 +
- >-----+----+
- >
- >I can get rid of those vertical bar columns in a jiffy with a good
- >editor, so that I can do the rest of the job of making a nice document in
- >WordPerfect.
- >
-
- Wouldn't a simple replace "|" with "" do the job???
-
-
- >I also found this feature useful when writing programs. Let's say I have
- >a section of code I decide to make conditional, so I want to indent it to
- >make an "if.. then.." block. I just insert a column of blanks in front of
- >that section of code.
- >
-
- Are you saying you don't format the code as you write it??? Most
- editors come with automatic indentation anyway.
-
- >There are other ways of doing all these things, but if you've ever used an
- >editor that handles column blocks easily and quickly, believe me, you'll
- >find lots of uses for the feature. Kedit recognized column blocks, line
- >blocks and "sentence blocks", and once blocked, you could copy, move,
- >delete, or fill with a character.
- >
- >Barbara Vaughan
-
- The main point of the argument is that when you are editing a program
- or data files, you require the block movement of entire lines. As for
- formatting code, I find the best time to do this is as the code is
- being entered. If more code is added that makes the code unreadable
- where indentation is concerned, there are a lot of code formatting
- programs around to do this.
-
- Cheers.
- --
- | David Rowland | The British are using New Zealanders. They must |
- | Datamark Intl Ltd | really mean business ! |
- | Wellington | - General Rommel During Northern African |
- | NEW ZEALAND | Campaign WWII. |
-