Author Topic: Global Aliases ::: characters missing when inserting in Find in Files"searchfor"  (Read 1236 times)

ehab

  • Senior Community Member
  • Posts: 285
  • Hero Points: 15
  • coding with SE is like playing music
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

« Last Edit: July 13, 2011, 02:46:53 pm by ehab »

Sandra

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 754
  • Hero Points: 35
I can confirm these results.  I'll look into it and see what's going on.

Sandra

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 754
  • Hero Points: 35
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.

ehab

  • Senior Community Member
  • Posts: 285
  • Hero Points: 15
  • coding with SE is like playing music
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.