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

1183RE: [jasspa] indenting and outdenting blocks of text

Expand Messages
  • Phillips, Steven
    Sep 29, 2004
    • 0 Attachment
      There are 2 approaches to this depending on what you are after:

      If you want the key binding to insert a specific date form straight away then start a keyboard macro, use hot keys to insert the correct date (do not use the mouse) end the keyboard macro and then use commands name-kbd-macro and insert-macro to get macro into your user setup file. This should give you a macro like the following:

      define-macro fred
      execute-string "\s\CDidE\CX)"
      !emacro

      (This inserted date form 'E') If you want the key to open the menu so you can choose the format then either use the first approach and edit the macro so it does not select the date, i.e. something like:

      define-macro fred
      execute-string "\s\CDid"
      !emacro

      Note that execute-strings using "\s..." (stands for special char) can stop working with the next release as the special key mappings can change, so alternatively copy the following into your user setup emf file:

      0 define-macro-file insdate osd-insert-date
      define-macro insert-date
      31 osd-insert-date
      31 osd
      !emacro

      You then just need to create a suitable global-bind-key line.

      Steve

      > -----Original Message-----
      > From: Tony Bedford [mailto:tbedford_csl@...]
      > Sent: Wednesday, September 29, 2004 5:26 PM
      > To: jasspa@yahoogroups.com
      > Subject: Re: [jasspa] indenting and outdenting blocks of text
      >
      >
      >
      > >>Jasspa just keeps getting better!)
      >
      > Yes!!
      >
      > Re: Insert date...very nice feature...but how to map the
      > insert date menu
      > option to a key combo? I could only find ascii-time - I
      > didn;t see any
      > insert date commands in the manual.
      >
      > Cheers,
      > Tony
      >
      >
      >
      > >From: Thomas Hundt <thundt@...>
      > >Reply-To: jasspa@yahoogroups.com
      > >To: jasspa@yahoogroups.com
      > >Subject: Re: [jasspa] indenting and outdenting blocks of text
      > >Date: Wed, 29 Sep 2004 08:46:55 -0700
      > >
      > >Ah, shift-tab, yet another new thing I haven't seen. (I keep
      > >discovering new features. Yesterday I found the Insert>Date
      > menu, long
      > >after writing my own insert-date. Jasspa just keeps getting better!)
      > >Tab and shift-tab won't work for multiple lines with ^U,
      > though. Maybe
      > >I'll rewrite mine to just be a wrapper around 'tab' :-)
      > >
      > >-Th
      > >
      > >
      > >Tony Bedford wrote:
      > >
      > > > Thanks a lot Thomas.
      > > >
      > > > The indent region works fine, I'll try to figure out an
      > outdent region
      > > > macro. Surprised no one has come up against this before.
      > > >
      > > > For indenting a line I can simply use tab and shift tab -
      > that seems to
      > >work
      > > > OK.
      > > >
      > > > Cheers,
      > > > Tony
      > > >
      > > >
      > > >
      > > >>From: Thomas Hundt <thundt@...>
      > > >>Reply-To: jasspa@yahoogroups.com
      > > >>To: jasspa@yahoogroups.com
      > > >>Subject: [jasspa] indenting and outdenting blocks of text
      > > >>Date: Tue, 28 Sep 2004 10:46:01 -0700
      > > >>
      > > >> >>[Tony]
      > > >>
      > > >>>>3) Last, but not least, how do I indent or outdent
      > blocks of text,
      > > >>>>I really miss this feature?!
      > > >>
      > > >>>[Steve]
      > > >>>I would currently write a quick key board macro, but if
      > used a lot I
      > > >>>would suggest the creation of a proper 'indent-region'
      > macro to do
      > > >>>this. I have created a quick 'writing macros' doc which is still
      > > >>>under construction but I post now in the hope that it
      > helps, see next
      > > >>>email.
      > > >>
      > > >>Here are a couple of really simple macros that help quite
      > a bit. If
      > > >>you're on a line, and type ^X^I, it will shove the line
      > over (indent) by
      > > >>four spaces. Use the one below, shove-back (^X^U), to
      > shove it left by
      > > >>the same amount. If you're on the first line of a
      > paragraph, and indent
      > > >>it four spaces, and then use ifill-paragraph, it will
      > indent the whole
      > > >>paragraph for you. I think I asked about this before,
      > and then Jon
      > > >>posted the shove-over-region one, which of course is much
      > better than
      > > >>mine. These live in my main "company" setup file.
      > > >>
      > > >>;------------------------------------------------------------
      > > >>; shove-over
      > > >>;------------------------------------------------------------
      > > >>define-macro shove-over
      > > >> !while &gre &pdec @# 1 0 ; C-u prefix support
      > > >> beginning-of-line
      > > >> insert-string " "
      > > >> forward-line
      > > >> beginning-of-line
      > > >> !done
      > > >>!emacro
      > > >>global-bind-key shove-over "C-x C-i"
      > > >>global-bind-key shove-over "C-x tab" ; for non-gui unix
      > > >>
      > > >>;------------------------------------------------------------
      > > >>; shove-back
      > > >>;------------------------------------------------------------
      > > >>define-macro shove-back
      > > >> !while &gre &pdec @# 1 0 ; C-u prefix support
      > > >> beginning-of-line
      > > >> !if &ise @wc " "
      > > >> forward-delete-char
      > > >> !if &ise @wc " "
      > > >> forward-delete-char
      > > >> !if &ise @wc " "
      > > >> forward-delete-char
      > > >> !if &ise @wc " "
      > > >> forward-delete-char
      > > >> !endif
      > > >> !endif
      > > >> !endif
      > > >> !endif
      > > >> forward-line
      > > >> beginning-of-line
      > > >> !done
      > > >>!emacro
      > > >>global-bind-key shove-back "C-x C-u"
      > > >>
      > > >>;------------------------------------------------------------
      > > >>; shove-over-region: (posted 2/23/02 by Jon Green)
      > > >>;------------------------------------------------------------
      > > >>define-macro shove-over-region
      > > >> set-variable #l0 $window-line
      > > >> set-alpha-mark "<"
      > > >> exchange-point-and-mark
      > > >> !if &gre $window-line #l0
      > > >> set-variable #l0 $window-line
      > > >> set-alpha-mark "<"
      > > >> exchange-point-and-mark
      > > >> !endif
      > > >> beginning-of-line
      > > >> set-variable #l1 @wl
      > > >> !while &less $window-line #l0
      > > >> beginning-of-line
      > > >> $tabsize insert-string " "
      > > >> !force forward-line
      > > >> ; Check for end of buffer.
      > > >> !if ¬ $status
      > > >> goto-alpha-mark "<"
      > > >> !return
      > > >> !endif
      > > >> !done
      > > >> goto-alpha-mark "<"
      > > >>!emacro
      > > >>
      > > >>
      > > >>--
      > > >>Thomas Hundt
      > > >
      > >--
      > >Thomas Hundt
      >
      > _________________________________________________________________
      > Use MSN Messenger to send music and pics to your friends
      > http://www.msn.co.uk/messenger
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      > --------------------~-->
      > $9.95 domain names from Yahoo!. Register anything.
      > http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/89EolB/TM
      > --------------------------------------------------------------
      > ------~->
      >
      > ______________________________________________________________
      > ____________
      >
      > 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
      >
      >
      >
      >
      >
      >
      >
      >
    • Show all 19 messages in this topic