Find combo box questions and how to join lines

This forum is user-to-user based and not regularly monitored by IDM.
Please see the note at the top of this page on how to contact IDM.

Find combo box questions and how to join lines

Postby mrmtmo » Mon May 19, 2008 3:47 pm

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 DropList? 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 DropList 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
mrmtmo
Newbie
 
Posts: 8
Joined: Mon May 19, 2008 3:26 pm

Re: Find combo box questions and how to join lines

Postby mjcarman » Mon May 19, 2008 4:59 pm

1) No, it isn't possible to change the size of the Find combobox. 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.
User avatar
mjcarman
Power User
Power User
 
Posts: 125
Joined: Thu Feb 10, 2005 12:00 am

Re: Find combo box questions and how to join lines

Postby mrmtmo » Mon May 19, 2008 5:19 pm

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.
mrmtmo
Newbie
 
Posts: 8
Joined: Mon May 19, 2008 3:26 pm

Re: Find combo box questions and how to join lines

Postby Mofi » Tue May 20, 2008 3:19 am

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.


2) This was already answered at Is there hotkey of UE to switch focus to the "search box" 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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4066
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Find combo box questions and how to join lines

Postby mrmtmo » Tue May 20, 2008 10:13 am

Thanks for the tips!
mrmtmo
Newbie
 
Posts: 8
Joined: Mon May 19, 2008 3:26 pm


Return to UltraEdit General Discussion