SlickEdit Community

SlickEdit Product Discussion => SlickEditĀ® => Slick-CĀ® Macro Programming => Topic started by: steve-o on May 21, 2009, 05:14:04 PM

Title: Search Options - Word At Cursor - Question
Post by: steve-o on May 21, 2009, 05:14:04 PM
Hi all:

I am using command line prompting in brief emulation.

I would like to pick up the word at the cursor as the default for Replace. It seems that the Search Options/Word At Cursor is what I need, but I get the last string I searched for as the default regardless of how that option is set. What am I doing wrong?

Alternatively, a way to programatically set the default search/replace string would work just as well.

Any ideas?

Regards
Title: Re: Search Options - Word At Cursor - Question
Post by: hs2 on May 21, 2009, 09:48:10 PM
Hi Steve,
although you didn't mention your SE version .. I'm quite sure that the attached macro stuff works fine for you.
Time ago I've added the feature you're missing to my SE b/c I'm also a Brief user.
So using the wrappers always default to word@cursor resp. current selection, but the history is also available of course.
BTW: I've also added word/dir/preserve_toggle commands as supplements to case_toggle and friends.
If you think it could be useful for you, just tell me.
Have fun,
HS2

Edit: Forgot to mention that you've to re-bind the appropriate keys to the wrapper commands after loading them.
Just for the sake of completeness.
Title: Re: Search Options - Word At Cursor - Question
Post by: steve-o on May 22, 2009, 04:55:21 PM
Great! Worked perfect. Thanks a lot.

Regards,

Steve