Perl --> \S autocorrects to \s

Perl --> \S autocorrects to \s

3
NewbieNewbie
3

    Dec 09, 2004#1

    Okay so using regular expressions in my Perl syntax in Ultraedit, and whenever I try to type \S it auto-corrects to \s, which is a totally different expression! How do I keep it from doing this? After looking into the Help file, I thought that maybe have "NoCase" added to the Perl section of my wordfile would make the difference, but nope...

    6,613550
    Grand MasterGrand Master
    6,613550

      Re: Perl --> S autocorrects to s

      Dec 10, 2004#2

      The correct no case definition is Nocase and not NoCase. UltraEdit makes case-sensitive compares during looking for definitions.

      You can also simply turn off the Auto Correct Keywords feature at Advanced - Configuration - Syntax Highlighting.

      Other solutions:

      In the Syntax Highlighting configuration dialog click on the button Open to open the wordfile and close the dialog with Cancel. Then scroll down to the Perl language definition which is in standard wordfile.txt of UE v12.10 the line starting with /L5"Perl".

      Next search down for a single s character. In standard wordfile.txt it can be found in the color section /C4"Operators".

      1) As miket describes delete the single s (whole line in standard wordfile.txt).

      2) Or add an upper case single S at the correct line which would be in the standard wordfile.txt in a new line before the character ^.

      The first alternate solution is better if you don't want the single s highlighted.
      The second alternate solution is better if you want the s in any case also highlighted.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Re: Perl --> S autocorrects to s

        Jan 28, 2005#3

        Another fix that doesn't require turning off auto correction: edit wordfile.txt (in your ue directory), find the perl section and remove the line with the single 's'. I would comment it out if I knew how to comment out this file. You can now leave auto correct on for Perl. It will ignore \S (which bit me today) and probably also ignore the case of s///, but hey, that's for the interpreter...

        Regards.

        6,613550
        Grand MasterGrand Master
        6,613550

          Re: Perl --> S autocorrects to s

          Sep 10, 2006#4

          A question to all Perl programmers:

          Should IDM modify the standard wordfile.txt with either solution 1) or 2)?

          If the answer is yes, which solution would you prefer?
          Best regards from an UC/UE/UES for Windows user from Austria

          1

            Re: Perl --> S autocorrects to s

            Sep 11, 2006#5

            Thanks for the solution, this has been mightily annoying for me as well. I'd suggest going with Solution #1, since highlighting the lower case s for substitutions in reg exps doesn't seem like a huge help to me. But leaving this as is (where \S autocorrects to \s) is a big deal. I use \S a lot and this was almost annoying enough to make me switch editors.

            Thanks Mofi,

            Justin