Author Topic: Two "columns" like a newspaper or Word???  (Read 6755 times)

buggyfunbunny

  • Senior Community Member
  • Posts: 233
  • Hero Points: 4
Two "columns" like a newspaper or Word???
« on: October 23, 2007, 06:25:29 PM »
I recently have been reviewing specs written in Word, and found that it has a Read mode, which, on my 16:10 monitor at least, is clearly legible as two pages side by each.

Which raises the question:  since lots of folks still insist on using 80 column coding style, how big a deal would it be to enable a (correlated?, or not) two page display?  Some languages are inherently 'verticle', either by rule or convention, and wide screens would be much more useful if this could be done.

By correlated, lines would scroll in/out the top of the left page, out/in the bottom of the right.  Or not:  paging would move the entirety of both pages at once.

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: Two "columns" like a newspaper or Word???
« Reply #1 on: October 23, 2007, 07:04:50 PM »
It oughta be easy......

Split vertical will put the side-by-side together on the screen.  I can record a macro to do a page down, but I cannot get it to move to the next window.  (I am _not_ a macro person, except when I want something new.)  How to switch to next (sibling) window?  I know I've seen it before.  Perhaps, later, I'll find it.

Best,
Jim

buggyfunbunny

  • Senior Community Member
  • Posts: 233
  • Hero Points: 4
Re: Two "columns" like a newspaper or Word???
« Reply #2 on: October 23, 2007, 08:36:51 PM »
ctrl-H gets one back and forth between windows.  But with current behaviour, the windows aren't sync-ed.  Aye, thar's the rub.

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: Two "columns" like a newspaper or Word???
« Reply #3 on: October 24, 2007, 11:14:30 AM »
Well, how's this:  split the window vertically, page the 2nd window down 1 screen, then run this macro:

Code: [Select]
_command double_down() name_info(','VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_MDI_EDITORCTL)
{
   _macro('R',1);
   page_down();
   page_down();
   next_window();
   page_down();
   page_down();
}

Granted, this only works if you have no other active windows, but it does the trick.  If you only want it to scroll one screen (i.e., 2nd window scrolls onto first, and 2nd scrolls down 1 page), then removing a page_down(); above & below the next_window(); will get that.

There are probably a dozen things that can be done to pretty that up, but I'm not familiar enough with the environment to do it (yet).

Best,
Jim.

buggyfunbunny

  • Senior Community Member
  • Posts: 233
  • Hero Points: 4
Re: Two "columns" like a newspaper or Word???
« Reply #4 on: October 24, 2007, 11:45:21 AM »
very cool.  now I can deal with COBOL.  I won't tell them that, of course.  :'(

buggyfunbunny

  • Senior Community Member
  • Posts: 233
  • Hero Points: 4
Re: Two "columns" like a newspaper or Word???
« Reply #5 on: October 24, 2007, 12:49:28 PM »
made a couple of changes (12.0.3/xp):


#pragma option(strict,on)
#include 'slick.sh'

_command double_down() name_info(','VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_MDI_EDITORCTL)
{
   _macro('R',1);
   page_down();
   next_window();
   page_down();
}

The first two lines are needed to avoid errors.  And just one pager is needed.  It does not run when the file is R/O.  No idea why that would be; the code I need it for is definitely R/O.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Two "columns" like a newspaper or Word???
« Reply #6 on: October 24, 2007, 12:58:27 PM »
Try adding VSARG2_READ_ONLY:
Quote
_command double_down() name_info(','VSARG2_MACRO|VSARG2_MARK|VSARG2_READ_ONLY|VSARG2_REQUIRES_MDI_EDITORCTL)
HS2

buggyfunbunny

  • Senior Community Member
  • Posts: 233
  • Hero Points: 4
Re: Two "columns" like a newspaper or Word???
« Reply #7 on: October 24, 2007, 03:53:12 PM »
d'oh