Loading ...
Sorry, an error occurred while loading the content.

RE: [jasspa] How to do this

Expand Messages
  • Phillips, Steven
    Firstly some minor changes are needed to the string-rectangle command so that the string to be inserted can be passed in as an argument to the macro, install
    Message 1 of 2 , Feb 18, 2004
    • 0 Attachment
      Firstly some minor changes are needed to the string-rectangle command so that the string to be inserted can be passed in as an argument to the macro, install attached rect.emf.

      Next a new space-rectangle is required which uses the string-rectangle to insert 'n' (numeric argument) spaces per line in the rectangle. I have added this to rect.emf and is defined as:

      define-macro space-rectangle
      set-variable #l0 &spr "%n" @# " "
      string-rectangle #l0
      exchange-point-and-mark
      !force -3 show-region
      exchange-point-and-mark
      !force 3 show-region
      !emacro

      Next you need to bind this to an easy key binding, e.g. for testing I tend to use:

      global-bind-key space-rectangle "C-j"

      And then define your rectangle and do

      C-j C-j C-j Cj-j ....

      or

      esc 10 C-j

      Steve


      > -----Original Message-----
      > From: salmankhilji [mailto:salmankhilji@...]
      > Sent: 18 February 2004 14:46
      > To: jasspa@yahoogroups.com
      > Subject: [jasspa] How to do this
      >
      >
      > Very frequently I encounter something like this:
      >
      > SOMETEXT1 FOO
      > SOMETEXT2 BAR
      > SOMETEXT3 EXAMPLE
      > SOMETEXT4 LINE1
      > SOMETEXT5 LINE2
      > SOMETEXT6 LINE3
      >
      >
      > What I wnat to do is line up LINE1 ... LINE 3 with FOO ... EXAMPLE.
      > So that it looks like:
      >
      > SOMETEXT1 FOO
      > SOMETEXT2 BAR
      > SOMETEXT3 EXAMPLE
      > SOMETEXT4 LINE1
      > SOMETEXT5 LINE2
      > SOMETEXT6 LINE3
      >
      > Currently, I do this:
      >
      > 1) First manually indent LINE 1 to line up with 'EXAMPLE' while
      > counting the # of spaces I have to press.
      > 2) Use the 'string-rectangle' command on LINE2 and LINE3
      > 3) Enter as the argument to the string-rectangle command blank spaces
      > equal to the # fo spaces I counteed in Step 1).
      >
      > I don't like doing this. What I like to be able to do is:
      >
      > 1) Select LINE1 ... LINE3 in somehow a rectangular selection mode.
      > 2) Start hitting space bar. Each time a hit the space bar is hit,
      > the selection moves to the right by one.
      > 3) Hit some key to exit out of this mode.
      >
      > How would one do this?
      >
      >
      >
      >
      > ______________________________________________________________
      > ____________
      >
      > This is an unmoderated list. JASSPA is not responsible for
      > the content of
      > any material posted to this list.
      >
      > To unsubscribe, send a mail message to
      >
      > mailto:jasspa-unsubscribe@yahoogroups.com
      >
      > or visit http://groups.yahoo.com/group/jasspa and
      > modify your account settings manually.
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.