Is there any way to define what a "word" is?

Is there any way to define what a "word" is?

2
NewbieNewbie
2

    Nov 15, 2005#1

    I would like the "_" character to be part of the word definition in UltraEdit.

    I use Ctrl + left/right arrow alot and it's anoying when the cursor stops at underscore characters in variable names.

    It would be nice if you could define it like you can define Ctrl + double click.

    Torstein

    6,675585
    Grand MasterGrand Master
    6,675585

      Nov 15, 2005#2

      CTRL+LEFT/RIGHT ARROW is a windows OS function and you cannot specify for it, which characters are word characters. If a program supports such a feature, than the developer of the program has written a code for it and does not use the windows (mfc) library function.

      But it's possible to use macros to expand CTRL+LEFT/RIGHT function.

      For Ctrl+RIGHT:

      HexOff
      Loop
      Key Ctrl+RIGHT ARROW
      IfEof
      ExitLoop
      EndIf
      IfCharIs "_"
      Key RIGHT ARROW
      Else
      ExitLoop
      EndIf
      EndLoop

      For CTRL+LEFT

      HexOff
      Loop
      Key Ctrl+LEFT ARROW
      Key LEFT ARROW
      IfCharIs "_"
      Else
      Key RIGHT ARROW
      ExitLoop
      EndIf
      EndLoop

      The second macro will fail to go to top of file, if the file starts with a word because of the automatic key right. But this should not be a real problem.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Nov 15, 2005#3

        I don't think this is a Windows/OS function. I would think that you will have the same problem in notepad, but you don't. Windows Notepad correctly see the underscore character as part of a word. At least on my copy of WinXP.

        I have other editors like EditPlus. It also see underscore as part of a word.

        I know that I can use macros. It's just that I think this is a bug in UltraEdit. I believe that most people using UltraEdit also do some kind of programing/code writing and almost all programing languages I know of accept _ as part of a defined name.

        Torstein

        6,675585
        Grand MasterGrand Master
        6,675585

          Nov 15, 2005#4

          OK, I'm not a windows programmer and don't really know, if it is a MFC function or not. Word97 also stops on _. But you are right, Notepad on WinXP has included _ as word character.

          Write an e-mail to IDM support and ask for a feature request or if you think it is a bug for a bug fix.

          I think, it would be great, if the word delimiters for CTRL+(SHIFT+)LEFT/RIGHT are loaded from the syntax highlighting definition if the file has one or from the "Delimiters" specification in the configuration/ini-file, if the current file has no syntax highlighting. Or a new delimiters specification only for CTRL+LEFT/RIGHT is added to the configuration dialog/ini-file.
          Best regards from an UC/UE/UES for Windows user from Austria

          2
          NewbieNewbie
          2

            May 05, 2006#5

            And when this is fixed, could you please make sure it also works for CTRL-SHIFT-LEFTARROW and RIGHTARROW

            This would be a big BIG time saver for me too.


            Any_word_on_it?

            6,675585
            Grand MasterGrand Master
            6,675585

              May 05, 2006#6

              Also v12 of UE does not have a configuration setting, which characters a single word can have. According to help of UE topic Delimiters (Configuration - Editor) for selecting a single word only alphanumeric character and underscore '_' is recognized.

              Please write a feature request email to IDM support if you need such a configuration setting to define what a "word" is.

              I personally don't need it because I have set key repeat rate to maximum and key repeat delay to minimum. 3 or 5 CTRL+(SHIFT+) LEFT/RIGHT ARROW makes no difference for me with these settings.
              Best regards from an UC/UE/UES for Windows user from Austria