SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: ehab on July 12, 2011, 08:01:39 AM

Title: Global Aliases ::: characters missing when inserting in Find in Files"searchfor"
Post by: ehab on July 12, 2011, 08:01:39 AM
hi

I think this can be a bug or by design since the escape code char are present!

Description:  some characters are missing when using global aliases to insert into the Search for field in Find in Files.

Pre-Conditions:  Add a global alias e.g.

Code: [Select]
testg
set to

Code: [Select]
RDebug::Printf\("@%s.*\n
Steps to reproduce:
1- Open the Find in Files dialog.
2- type testg in the search for field then press CTRL+Space  " my binding - yours maybe different. its codehelp-complete command"  .

Actual results:

Code: [Select]
RDebug::Printf\("@
Expected result
Code: [Select]
RDebug::Printf\("@%s.*\n
i hope someone can check this : )

regards
ehab

Title: Re: Global Aliases ::: characters missing when inserting in Find in Files"searchfor"
Post by: Sandra on July 13, 2011, 01:14:29 PM
I can confirm these results.  I'll look into it and see what's going on.
Title: Re: Global Aliases ::: characters missing when inserting in Find in Files"searchfor"
Post by: Sandra on July 13, 2011, 02:20:38 PM
Alrighty, here's the deal.  You already realized that we are using the % as the escape character in this case.  If you want to have a % in your alias, you need to double it.  In other words, you want to enter your alias as

Code: [Select]
RDebug::Printf\("@%%s.*\n
If you click on the arrow button next to "Insert Escape Sequence" on the Alias editor, you'll see the "Percent Sign" value on there.  Still, it's not really intuitive if you are just trying to enter some aliases without looking at that list.

Hope that helps.
Title: Re: Global Aliases ::: characters missing when inserting in Find in Files"searchfor"
Post by: ehab on July 13, 2011, 02:46:35 PM
it does help. Thank you.

true, i didn't consider that some characters need to be escaped that way. I can suggest that if a user enters in such character you'd underline it or bg in red this will somehow let the user click on the "Insert Escape Sequence". Or better still Have a check box to activate the escapes otherwise all considered as text Maybe in future : )

thanks again for your time.