Searching - Notepad++ User Manual

You might also like

Download as pdf
Download as pdf
You are on page 1of 8
Notepad++ User Manual Roe COC) ee RU Pee Rey rr) en] eee pera Meu Me ea recurs occu MMC aT rence) Cy a Cee nec Cece RUSE cca) Binary Translation aa UC) Other Resources There are multiple methods to search (and replace) text in files. You CORE ee ee RCo eau CRU eCard Ree ee ee Sen eee UCU nC based) Find / Replace / Find In Files / Mark, the dialog-free Next / Previous search-navigation, and the Incremental Search. EO ene ta ene oe Cont Reena ae eco d for any menu item in the menu entry, or in the Shortcut Mapper. Dialog-based Searching Se eee nner en Ree Cen ecu CcPa a PA Me Peete eR Re a Ce tab for each of the aforementioned searching-related features. The Find tab (accessible using Search > Find or the keyboard shortcut Ctrl+F) gives access to searching and counting. The Replace tab Ceres Cr Cet ene) eae eS ORO ed ad the matched text after it's found. The Find in Files tab (Search > Find in PT gCUeSieta EUS ence Res ean Caio Ro ac eee Ce STN] red-marking (a red background to matched text; see (Preferences > Style Configurator > Global Styles > Find Mark style] Geen ee Rr ee ELT) Dm Sa Rc eT Note: Although a keyboard command can open and/or move input focus to one of the four tabs of the “Find” window, once this input focus is achieved, there is no possibility to switch to another of the tabs via the keyboard; the mouse must be used, or the window closed (via the Escape key) and the alternate tab’s keyboard shortcut (or menu command) then invoked. Note: Use of some “Find” family features can cause the window to Cet CRUE Rim UM MS OLN Oe CS ECR AC nCRCCE CR MUTE CO] for the dlgAlWaysVisible= parameter. It defaults to CIty Fro ae na gee Notepad++ User Manual Roe COC) ee RU Pee Rey rr) en] eee pera Meu Me ea recurs occu MMC aT rence) Cy a Cee nec Cece RUSE cca) Binary Translation aa UC) Other Resources CIELO) ete RO RUM UO ENC aCe mata Pe Ree Renee ae Cet end Nea ee UMAR Coy PUR ee ee UO ne ST CIR TMs meee eo CRU ee hee ets SR eS TIC Peng Dee Sa ee CN eRe S will replace what was matched See ae eee) Bre eRe a Cea RRC ue aU mua (other buttons, such as Find Next, will continue to work on the whole document) + (Backward direction: normally, searches go forward (down the page); with this option, they will go backward (up the page) + (Match whole word only: if enabled, searches will only match if the result is a whole word (so “it” will not be found inside “hitch") See Cu Coa ee ene aC search for “it” will not find “It” or “IT"). The regular expression i ET RMON CR Ue eel ee Oe 9 TLRS Cee Leas RT Sue eRe eRe + OWrap Around: if enabled, when the search reaches the end of the document, it will wrap around to the beginning and continue Peet] * Search Mode: this determines how the text in the Find what and Coo eee) Oe Re cont y Cees KO AOAC CRTC RU ae described in Extended Search Mode (below) Seen Ut ate nee Ce con CRO SCR ae Seu es Cea) Notepad++ User Manual Roe COC) ee RU Pee Rey rr) en] eee pera Meu Me ea recurs occu MMC aT rence) Cy a Cee nec Cece RUSE cca) Binary Translation aa UC) Other Resources TRU see) Pee Cas ee eee Co RIC eo ee RUT oLCeReCc except the line-ending characters (carriage-return and/or Tee RAR ede CO Cee Re Cun aOR nt checkbox, begin the Find what box text with ((228)) to SOU ee Conc Ca with ((28)) to get its checked behavior. Seu eu Ue ee cma tha aca Ury dialog box is opaque (can’t see the text beneath), but with these Rene OMT Secu CaCl CRS ure cca tesura Cun Cute mec UC text beneath) Sees Roc eee ee er Re RINE AUER Ct em a ate Nee ee Me Rea Oe a eee Ce Roe Cue CeIn anu eed BS eg eae na Ce RR Cd Sea Cee CRS Been eR nae ee Te ee ay * By (temporarily) setting it to Always, you can see how transparent the dialog will be while moving the slider, ecu ne Ce OS BUC Ue CEC Rete Oe Sa Ran Ro © D'This checkbox changes the single Find Next button into << Cr ee nme aS Me SON Ua mee eee SCE ee Oca ne eRe nec UM o) Oe eee aE eae eee the specified direction, or possibly “In Selection’, and shows that Cena eee ee Cac nemICR CE Td eee cane ee ea oe ee ue eee on new Find result window; searches through all the file buffers rea ches Notepad++ User Manual Roe COC) ee RU Pee Rey rr) en] eee pera Meu Me ea recurs occu MMC aT rence) Cy a Cee nec Cece RUSE cca) Binary Translation aa UC) Other Resources OSU EEO R Cu tC e RUE a OR UCR Ree aloe Oe me eRe Cn i) Bae Soe eC a currently selected, it behaves like Find Next and just highlights the Tra R UES LCR lc eaten) Oe Soe eee ne Cot a ce CO ene ene ite EUR CT ec Eos ONO es a eee eR Ree) PT RU ce eens mC CRE Ree UR UnUE eRe RR Rua ES Secs eee EO Ue Be ene coe ret ca eee oe goes through all the documents open in Notepad++, not just the active document. Re OCCUR gee RUS appropriate button, or via special Alt key combinations. With focus on CRU eR ee eee eee ae ea Reo ce eee SUC e Rer cance ied of the buttons. Pressing Alt and one of the underlined characters will Pere Oe SR ee CR UR URC mC Ce Tee Cc a eT OR Col oe) STRUM eR Me Ree ote Oke Te RT cena Rec Find Next has a special way of being invoked by keyboard control. eee am Cun Re COR SCOR et PO ec RUS cue Cr eet ae See Sena ing Ree Con ste Find Next in the opposite direction as that indicated by Backward Cece Mt RC ce cu eRe a slight delay, pop up a tool tip indicating Use Shift+Enter to search in Te ee ee RT CU When a find-family function is invoked via the Search menu, toolbar, or Pee EE aR eee eure eee oc any) is automatically copied into the Find what edit box. This behavior Notepad++ User Manual Roe COC) ee RU Pee Rey rr) en] eee pera Meu Me ea recurs occu MMC aT rence) Cy a Cee nec Cece RUSE cca) Binary Translation aa UC) Other Resources Cela ee ee RU eR Pe ee RAC ee ER Rene) ER eM Rm CS eee CCT ay word and that there is no active selection when invoking the find-family command. Aside: This auto-copy feature can be exploited to get multi- line data into the Find what edit box, something that it is not possible to do via only typing into the box. Simply select the multi-line text that you want to search for, and then call up the Find dialog via one of its functions. The selected text will appear as usual in the Find what box. The line-ending character(s) won't be visible, but they will be there and will be matched when a search/replace action is initiated. Avvalid Find what edit box entry length ranges from 1 to 2046 CeCe OER Cea Un aaa URC OR 2046 characters. Any text entered/pasted into these boxes beyond the 2046th character is simply ignored when an action is invoked. Note SO eae Ee tee eee Cc RIC Rote Ree uD eae ae ce une eee SOR Re ese On eee ee eck UR es eae ey PC RCE CRE Rec ee RCE ULY beginning and end of your regular expression Find what text. De Leone Ocoee ie ead PRU ca Oe eck ec a PRR oe em seu aa ea) Dre ee een eC Ce ec eC acd editing the (6onfig xml) configuration file, The Find in Files tab’s Filters and Directory text boxes have this “history” feature as well. This Tepe Ree eee eee une ie eRe CRU Ce hee er ey when editing a control with the history feature, a user will accidentally hit an up or down arrow key when they really mean to press left or right SOR ORCA ORS OAC clea oO Cry those are edited most often) that was being worked on and replaces it with some different text from the history buffer. RO Cretan tea eer eena eea GR Ra ee oi RCo cents in the active selection. The selected text will also be placed in the Find RO ee eee coe ue eur ka Notepad++ User Manual Roe COC) ee RU Pee Rey rr) en] eee pera Meu Me ea recurs occu MMC aT rence) Cy a Cee nec Cece RUSE cca) Binary Translation aa UC) Other Resources changes to the search parameters will result in Count: 7 match or fo ee Ree ae eS CA Ren CR ac CRC tune the Find what text if the intention is to search within-selection, or deselect In selection if the intention is to search for a fairly long block Cac SS CeD a RU hoc ke mC RUS Cee Ra ee UCR aS ee Find: Invalid regular expression. Colors are used in the status bar for CUR Ra a eee ig ecco) Caen Peer LS NUR Ce Cet see Cen oa RRS tam a ee ce Eee RAIS ae Se Tee ee COICO NAC aero eee M ECC nee eo a OUT) Rec mCRCOS UCR CIRM men eas Sean ite Ne nee ese Cen aU RC Ra ee RUT Nee Eem MT Mme CUR Cag Rr Ree RCM ec that search text has not been found (or possibly that a Wrap around in OCR CM Sa aoe SCS R Ra ne Cae CR Cen eo) failure indication. If the Find dialog window is NOT open, and a failed search is initiated (e.g. via Find Next on the Search menu), the main Ne ee Om Cae CeCe Un ecm aC Cie eoe TRU RR ee ee SCI Ea eae eo RC Ee Rea SOR ee aT eke Tena Cee addition, audible feeback will be provided if a Find Next or Replace Ee RUM ROC a mee RU em UROL oy volume level can be controlled/muted by configuring the Notepad++ Ee RR Cn oc Tee ere RUC Rn dialog window open and input focus in the editing window, an unsuccessful search will result in input focus being changed to the CR eae een Re Re oe Cy search at this point? rel Tema Ree ee Cn ea ORR L-CAed RC ECU aCe, iC ce eacecio Rens Notepad++ User Manual Roe COC) ee RU Pee Rey rr) en] eee pera Meu Me ea recurs occu MMC aT rence) Cy a Cee nec Cece RUSE cca) Binary Translation aa UC) Other Resources Oa oe eC ee Pee eee nck eae eR Neer nema Re eR ee cme eco results, they can tell Notepad++ which files to open and which line and column numbers to move the caret to, in order to work with matched results. Examples of such power file/text searching tools might be: Reread aU ld After running one or more Find All in ... commands, a new Find result window appears, and within it is placed a Find result tab. The Find Ce ee a eeu acer aT RL De ect i em een) shortcut. Note: That menu command will seem to not do anything if Oe Cue Dae ee ed ecg Rut) oma UC Ree ORL Ts (ood *Which Find All in... command* —_—_ Find window owner tab CEE Re ahr a) URN eres cor TEAL bau Rt Sa et Ree Coe oc ec Cun Notepad++ main window. Like other such windows, it can be moved or Cee ces a Ua Nee Relea ees (oto ORD Find result window. First is a line describing what was searched for, how many total matches (known as “hits") occurred (this is also shown in the title bar for the window, for the most recently-occurring search), SOUR eS Rae oe Le eS Tee Rue aCe AC ROR ie een icra Ra ea Seo Last comes the details about the matches found, including line number Cea ee Reon er CO Renn Ce Re ecu) CR eee ee aes When Notepad++ populates the Find result window, it does so using one line for each match found by the search. Note that this can and Notepad++ User Manual Roe COC) ee RU Pee Rey rr) en] eee pera Meu Me ea recurs occu MMC aT rence) Cy a Cee nec Tee RUSE cca) Binary Translation aa UC) Other Resources ee RMR ES ee ce RR Ec eR times in the output. An example of this would be if you are searching for “the” in the line of text that reads “Now is the time for all good men to come to the aid of their country”; the Find result window would list the line twice, once with the word “the” called out

You might also like