Find combo box questions and how to join lines

Find combo box questions and how to join lines

8
NewbieNewbie
8

    May 19, 2008#1

    I'm a long time SlickEdit, Vim, and Visual Studio user. I'm testing UltraEdit on a few new projects and have some very simple questions.
    1. Is it possible to change the width of the Find combo box in toolbar? If so, how is it done? The customize toolbar mode doesn't seem to be using a framework that allows dragging and dropping new buttons and/or resizing controls on the toolbar.
    2. Is it possible to position the cursor in the Find combo box using a hotkey? For example, Ctrl+D in Visual Studio.
    3. How do I "join" lines? Basically, I'm looking for the equivalent of <Shift>+J in VI/Vim. Do I have to write a macro for this (something like goto eol -> delete -> select whitespace -> delete)?
    - Michael

    119
    Power UserPower User
    119

      May 19, 2008#2

      1. No, it isn't possible to change the size of the Find combo box. You can edit the toolbars but it isn't a drag & drop interface.
      2. Not AFAIK. I always use the Find dialog (Ctrl+F) or occasionally "find as you type" (Ctrl+Shift+I)
      3. There's no direct equivalent of vi's Shift+J but there are a number of similar things. The closest analog is probably Format -> Convert CR/LFs to Wrap. It does not strip leading whitespace from joined lines. (IIRC, Shift-J in vi doesn't do that, either.) I often use Format -> Reformat Paragraph (Ctrl-T), which does reduce leading whitespace to a single space. There's also Reindent Selection, HTML Tidy integration, Artistic Style Formatter integration... I've added a user tool for PerlTidy and written scripts to do "reformat paragraph" for comments... There are lots of options.

      8
      NewbieNewbie
      8

        May 19, 2008#3

        Thanks for the response :)

        1 & 2) Bummer. I'm not sure why it is so small by default. It's approximately 8 chars on system. I like to stick to the keyboard and have always disliked modeless find dialogs in my face.

        3) I see. I'll check into the options when I have time.

        6,686585
        Grand MasterGrand Master
        6,686585

          May 20, 2008#4

          1) The width of the Find combo box can be changed as I just have found out. It is not documented, but when you look into the toolbar profile file you currently use - *.tfg and *.tbr for UE < v14 or *.tb1 and *.tb0 for UE >= v14 in the directory of uedit32.ini - you will see the line:

          WC 100 ID_TB_COMBO_FIND

          100 is the width in pixels of the find combo box which you can increase. Save the modified toolbar profile file(s) and restart UltraEdit and you will see that it works.

          Update 1: UltraEdit for Windows v15.00 and UEStudio v09.10 introduced the feature to define Find Box Width in the toolbar customization dialog.

          Update 2: For UltraEdit for Windows v23.00 and UEStudio v16.00 and later versions see Where is the Search Box in UltraEdit for Windows v23.00?


          2) This was already answered at Is there hotkey of UE to switch focus to the search box in toolbar? although the answer will be surely not satisfy you. Maybe it would be a good idea to write a feature request email to IDM and ask if a command can be added to the key mapping configuration which sets the focus to the Find combo box in the toolbar.


          3) If you want to join lines with a macro, here is one solution:

          InsertMode
          ColumnModeOff
          HexOff
          UnixReOff
          IfSel
          Find RegExp "[ ^t]++^r++^n[ ^t]++"
          Replace All SelectText " "
          Else
          Find RegExp "[ ^t]++^r++^n[ ^t]++"
          Replace " "
          EndIf

          Add UnixReOn or PerlReOn (v12+ of UE) at the end of the macro if you do not use UltraEdit style regular expressions by default - see search configuration. Macro command UnixReOff sets the regular expression option to UltraEdit style. Or translate the regular expression to Unix/Perl syntax.
          Best regards from an UC/UE/UES for Windows user from Austria

          8
          NewbieNewbie
          8

            May 20, 2008#5

            Thanks for the tips!