Menu

how to replace text with carriage return

2007-08-28
2012-11-13
  • Nobody/Anonymous

    I would like to replace the text "><" with:
    >
    <
    (> enter <)
    Is there a way to do this?

    Thanks.

     
    • Chris Severance

      Chris Severance - 2007-10-01

      The editor boxes in the Ctrl+R dialog are made with Scintilla so they can do much of what Notepad++ does. Rather than hack up the paste function it would make more sense just to turn on the Notepad++ equivalent of "show all characters." I considered doing that but wondered who exactly would want it.
      [CR][LF]
      [TAB]

       
    • Nigel Pentland

      Nigel Pentland - 2007-08-28

      use Ctrl-R for the advanced Replace dialog

      also accessible via the menus, i.e.

      TextFX - TextFX Quick - Find/Replace

      and it's Ctrl-M for newline

       
      • John Zastrow

        John Zastrow - 2007-09-17

        I've seen all the threads on this topic. But as long-time user of Notetab Pro its killer feature for me is when I select a CR/LF it kindly replaces it with ^P in the dialog so that I can see I've got the right thing (important when I could have CR/LF, tab, and space sequentially). I'd can also just type these in. These tokens are handy because I don't need to switch to regex mode (which always baffles me) and sounds like it's a little flaky with these chars in NP++. Without this feature I cannot completely switch to NP++. So, I guess this is a feature request.

        Here is information from the user manual.

        Tip: You can quickly copy text from the Find field to the Replace field by double-clicking on the "Replace with" label.

        The Find and Replace dialog boxes accept tokens to represent special characters:

        ^T = Tab ($09)
        ^B = Page break ($0C)
        ^P = Paragraph (carriage-return/line-feed pair)

        The following are not available in NoteTab Pro:

        ^C = Carriage-return ($0D)
        ^L = Line-feed ($0A)

        If you actually need to search characters that correspond to one of the tokens, just precede it with an extra ^ symbol (for example ^^T to search for ^T).

        Note that these tokens are not applicable when you perform regular expression searches.

        When you paste text into the find/replace fields, NoteTab automatically converts special characters into their corresponding tokens. This feature takes into account the regular expression setting. If the Regular Expression checkbox is checked, NoteTab will convert the pasted text into the corresponding pattern. You can bypass this conversion feature by holding down the Insert key while you paste the criteria in the field.

         
    • Nobody/Anonymous

      I was looking for this before.  Does the ctrl+m also work with regular expression search and replace over multiple lines?

       
    • Nobody/Anonymous

      Ctrl+M? I was looking for that one too. But it does not always work. Here's an example. Let's denote newline by "\n" (without the quotes). Now try replacing "\n'" by "\nWHEN(" - it won't work.
      I humbly suggest to introduce "\n" and "\t" into both n++ and TextFX search&replace functions (even though the regexp parser might become a real nightmare).

       
      • pshute

        pshute - 2007-09-05

        Control+M only works with regex turned off.

        \n support is very dodgy in Notepad++, and apparently it's going to be hard to fix.  See http://notepad-plus.wiki.sourceforge.net/FindReplaceNewlineHowTo for more information.

        Control+T works for tabs, possibly only when regex is turned off too.

         
MongoDB Logo MongoDB