[OT] Text Editor that Does Tables?

I enter a lot of tables as C-language comments. I use vertical bars and so on to separate columns.

A typical table might be a Boolean function, or a list of I/O pins and how they are assigned. 2-100 rows is typical, and 2-5 columns is typical.

Widening columns is a huge headache, as I have to do every row of the table (sometimes hundreds of lines). I use a SlickEdit macro repeatedly, but even then it is a huge job.

Is there a text editor out there (or a feature of SlickEdit I'm unaware of) that supports ASCII tables directly?

Thanks.

--
David T. Ashley              (dta@e3ft.com)
http://www.e3ft.com          (Consulting Home Page)
http://www.dtashley.com      (Personal Home Page)
http://gpl.e3ft.com          (GPL Publications and Projects)
Reply to
David T. Ashley
Loading thread data ...

I would be there's a way to do it with emacs, though off the top of my head I only know how to delete a vertical column, not insert one.

However emacs is not for everyone... it's as much a religion as a tool.

Reply to
cs_posting

Why not use Perl to do this? I used to use awk, back in ancient times, but Perl is very well suited to this kind of text manipulation. Very C-ish syntax so the learning curve wouldn't be too high.

The canonical free Windows distro is from

Note that they do have commercial "pro" versions as well.

--
Rich Webb     Norfolk, VA
Reply to
Rich Webb

Emacs can do that using the rectangle commands. C-x r k (kill-rectangle) to remove a rectangular block (i.e. make a column narrower), C-x r t (string-rectangle) to make a new column or to make one wider. Maybe your editor has similar functions.

Stefan

Reply to
Stefan Reuther

Thanks, I'll look into that. It is OK with me to use two text editors ... one for most editing and one for tables.

Where would I get a version of emacs for Windows (I use it, but barely, only on my Linux box)?

I'll also contact SlickEdit to see what they have to say about editing tables.

Reply to
David T. Ashley

I copy/pasted "emacs for Windows" from your message, and fed it to Google, whose first hit produces:

formatting link

See section 2.

-Mike

Reply to
Mike Wahler

Make that:

formatting link

The first URL I posted was of course the google search command.

-Mike

Reply to
Mike Wahler

If you're going for emacs, you might want to consider org-mode, which has a nice table editing mode that can be used as a minor mode; see

formatting link

tg

Reply to
Thomas Gellekum

Doing this sort of thing is a snap using UltraEdit.

formatting link

--
Guy Macon
Reply to
Guy Macon

Thanks. I've heard about web search engines, but never tried one. Looks like they might be useful.

Hey, does Google have stock? Maybe I can get in on the ground floor before any other investors?

Reply to
David T. Ashley

Notepad++ (Free, Sourceforge) has a couple of features useful here :

a) Shift-Alt-Clk selects any rectangular column of text, corners set by EditCursor, and current mouse cursor. You can thus add, or delete whole columns. ^C, ^V of this column, works as expected - still column-tagged.

b) A new mode Column Editor, allows a String to be duplicated from the Edit Cursor to the EOF, and extends any lines it needs to. ( so you could enter ' | ' for example to get your column lines. The EOF is a quirk, which means you would pull your column block out to a separate file, and paste back later.

-jg

Reply to
Jim Granville

I have an ancient version of slickedit that I use and am quite happy with. I never use macros so you can probably do something much more clever than what I would do. However I would probably do something like this: Capture an entire column of vertical bars (right mouse key select). Copy it to an empty scratch buffer. Select the a rectangular block that includes the space you want and the vertical bars. Clip it and replace the original column of vertical bars. It's only two select/copy/paste steps. I daresay you could make a macro out of it.

Richard Harter, snipped-for-privacy@tiac.net

formatting link
formatting link
Save the Earth now!! It's the only planet with chocolate.

Reply to
Richard Harter

You can try kedit. Or THE (The Hessling Editor), which is a clone of Xedit with enhancements. Uses REXX as it's macro language and can do block editing.

Regards Anton Erasmus

Reply to
Anton Erasmus

Look around for VEDIT PLUS. You can set every tabstop as needed, and separate fields with tabs.

--
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: 
            Try the download section.
Reply to
CBFalconer

(Consulting Home Page)

formatting link
(Personal Home Page)
formatting link
(GPL Publications and Projects)

Ultraedit has a great collum mode (alt-c to toggle between collum and normal mode) it can do what I think you want.

it hard to explain how it works but, try to mark a collum of text, and then cut and paste or type something, you will see how it works

-Lasse

Reply to
langwadt

You can do this easily with JEdit. It has a column mode that you can put the editor in, but you can also just hold down the ctrl key and click and drag your mouse to select your column. Then what you type in is applied to all the lines in the column. So you could do this to create each of your column's vertical lines - select an area and type the character you're using for column once, and it will appear on every line in your column. And of course pressing space will widen you column, delete will narrow it.

On the download page it does say "Even if you're "just a user", you should still try the development version". Nah - don't. Go for the stable one.

I use it as my main development editor on both windows and linux. It has lots of plugins that you can download for it, although the only one I really use I guess is the diff plugin, which is a pretty good one - *some* of the other ones are of dubious quality.

Take a look at the screenshots on the website:

formatting link

I can't believe no one else suggested it :-)

Regards,

Paul.

Reply to
Paul Taylor

Are you kidding?

Try Google to search for it.

For your table question: I'm using UltraEdit, which has a column mode, but it doesn't sound like a good idea to code 5x200 cell size tables in C comments. I would use Excel (or OpenOffice on Linux) for it. Then save it as CSV. Maybe your implementation for the logic function can just read this CSV and use it at runtime. Or you can write a source code generator, if it is time critical. You can even write a generator for your comments and a program, which uses the CSV as test input and calls your function to verify it against the table.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

And, since nobody yet mentioned it, and because the word 'emacs' has fallen, I'm suggesting the vim editor for All Your Editing Needs.

--
:wq
^X^Cy^K^X^C^C^C^C
Reply to
Ico

Bit of a golden oldie this one (written for DOS and OS/2) but don't let that put you off - it's tiny, _uncomfortably_ fast and solves your problem in a very natural way. The feature set is not particularly extensive but it always strikes me as being very well chosen:

formatting link

Unlike most other editors, this one's block indent functions work at the current cursor position rather than the home position. Adjusting your table columns is as simple as selecting the lines in question, moving to the right position and hitting shift F7/F8 as appropriate.

I see from your headers that you are running Windows - if your version supports it (ie NT or 2000) I recommend running the OS/2 version which will give you long filename support. However, it isn't really such big deal if you can't - run the DOS version and use drag and drop which will sort out DOS-compatible filenames transparently. Both versions are included in the same zip.

--
Andrew Smallshaw
andrews@sdf.lonestar.org
Reply to
Andrew Smallshaw

I don't use emacs but do on occasion use vi, although after about an hour of using it I have to ask someone to untangle my fingers ;-)

Regards,

Paul.

Reply to
Paul Taylor

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.