Author Topic: Text substitution - the lost magic  (Read 8783 times)

dtalaski

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Text substitution - the lost magic
« on: February 26, 2010, 08:15:29 PM »
I've been a happy slickedit 11.0.2 user for some time now (okay, a long time), but unfortunately my hard drive died the other day. Good news - new computer, bad news - lost my slickedit configuration. I've got backups for email, docs, etc, but not my SE config. Anyway, before the hard drive failure I could type: "<= " (arrow with a trailing space) and SE would respond by replacing "<= " with "<= #1 ". I could do this substitution anywhere in my code. I thought this was an alias, but come to find out that aliases have to start on a new line. I've scoured the documentation/menus/SE forums, but can't seem to find a way to make this happen. Can anyone help me restore the magic?

dtalaski

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Re: Text substitution - the lost magic
« Reply #1 on: February 26, 2010, 09:49:57 PM »
Didn't find the original magic, but I made some new magic - my first macro! woot!

_command void pound_one() name_info(',')
{
  _insert_text( "<= #1 " );
}

Bound my new command to <CTRL>, and I'm set. Pandora's box is now open.  ;D

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Text substitution - the lost magic
« Reply #2 on: February 27, 2010, 12:43:36 AM »
Sure about <CTRL><COMMA> ? It's the SE default binding for pop-bookmark ...
However, congrats to your 1st macro - you'll love it :)
HS2

dtalaski

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Re: Text substitution - the lost magic
« Reply #3 on: March 01, 2010, 03:24:41 PM »
I chose <CTRL>, since it was the closest combination to <SHIFT>, which generates the leading "<" I'm looking for. Currently, I only use next-bookmark and prev-bookmark. pop-bookmark does look interesting if you're following a path through a lot of code. I may have to modify my macro.  ;)

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Text substitution - the lost magic
« Reply #4 on: March 01, 2010, 04:52:00 PM »
'pop-bookmark' is the counterpart of 'push-tag' usually bound to <CTRL><DOT> (also called on goto definition).
So it's very interesting when following a code path or hierarchy down and up again ;)
HS2