• Closed Snippets Window and Can't Get it Back

    2
    0 Votes
    2 Posts
    2k Views
    kawingaK

    Plugins - Snippets - Snippets

  • Select to End of Paragraph

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Organizing data

    4
    0 Votes
    4 Posts
    4k Views
    guy038G

    Hi Kim,

    From your reply, it happens that one SPACE should be present, in the search regex, between the opening round bracket and the block [+-] !

    Well, I just realized that your numbers could be separated by more than one space characters ! Moreover, your file may, also, contain some tabulation characters. In that case, prefer the search regex below ( The replacement regex is unchanged ):

    (\h+[+-]?\d+(\.(\d+)?)?[Ee][+-]\d\d){3}

    Notes :

    The \h regex syntax matches one horizontal blank character, that is to say :

    The normal space character ( \x20 )

    The tabulation character ( \x09 )

    The No-Break space ( abbreviated NBSP ) ( \xA0 )

    As usual, the + quantifier means one or more times the previous character

    So given the test example below, where I put, between numbers, several spaces, in the first line, several tabulations in the second line and a mix of these two, in the third line :

    ospht421 4.52E-02 -1.20E-02 2.98E-03 3.19E-02 -1.93E-02 -6.87E-02 4.16E-02 1.71E-02 -2082.95E-02 ospht000 +9.9999998E+03 +1.23e-07 -5.4625e+04 -6.258E-00 5.789E+02 1.008E-06 +9.E+03 +1.E-07 -5.e+04 ospht999 -6.E-00 5.E+02 1.e-06 +9E+03 +1e-07 -5E+04 -6e-00 5E+02 1E-06

    After clicking on the Replace All button, we get the following text :

    ospht421 4.52E-02 -1.20E-02 2.98E-03 3.19E-02 -1.93E-02 -6.87E-02 4.16E-02 1.71E-02 -2082.95E-02 ospht000 +9.9999998E+03 +1.23e-07 -5.4625e+04 -6.258E-00 5.789E+02 1.008E-06 +9.E+03 +1.E-07 -5.e+04 ospht999 -6.E-00 5.E+02 1.e-06 +9E+03 +1e-07 -5E+04 -6e-00 5E+02 1E-06

    Now, we have to get rid of all the possible blanks characters, at the beginning of the lines and just keep one space character between the different numbers. The following S/R will achieve it, nicely :

    Find what : ^\h+|(\h+)

    Replace with : (?1 ) , with a space after the digit 1

    Notes :

    Due to the alternative regex symbol |, this search regex looks :

    for any non null range of blank characters, that begins the line ( the ^ symbol represents the zero length assertion beginning of line )

    for any subsequent range of these blank characters, between the numbers

    The second part (\h+), ( the subsequent blanks ), is enclosed in round brackets, and represents the group 1

    In replacement, we use the conditional form (?n....) :

    which replace the searched regex with the string located after digit n , till the ending round bracket, if the group n exists

    which does NO replacement if the group n does NOT exist

    So :

    When the first part, of the search regex, matches possible blank characters, at beginning of a line, group 1, does not exist. Therefore, there’s NO replacement

    When the second part, of the search regex, matches blank characters, before the numbers, group 1 exists. Then they are replaced with the single space, located between the digit 1 and the ending round bracket, of the replacement regex

    This time, after performing this second S/R, we obtain the final text below :

    ospht421 4.52E-02 -1.20E-02 2.98E-03 3.19E-02 -1.93E-02 -6.87E-02 4.16E-02 1.71E-02 -2082.95E-02 ospht000 +9.9999998E+03 +1.23e-07 -5.4625e+04 -6.258E-00 5.789E+02 1.008E-06 +9.E+03 +1.E-07 -5.e+04 ospht999 -6.E-00 5.E+02 1.e-06 +9E+03 +1e-07 -5E+04 -6e-00 5E+02 1E-06

    Cheers,

    guy038

  • How to create UDL with folding similar to INI file?

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Group changing

    2
    0 Votes
    2 Posts
    2k Views
    gerdb42G

    This is related to Winscp, not to NPP. Please refer to Support pages on https://winscp.net

  • 0 Votes
    4 Posts
    4k Views
    gerdb42G

    This is nothing specific to NPP. In Windows, elevated Processes (running “As Administrator”) belong to a different Logon-Session and some settings may not be shared across Sessions, Drive Mappings being one of these. This is also the reason why Drag & Drop between elevated and non-elevated Processes doesn’t work.

  • 0 Votes
    3 Posts
    4k Views
    John SparkJ

    2, solved
    3, it’s not possible to do it this way to have accurate numbers. i have to embedd code for it into my script

    let me ask new thing. NP++ new folder view feature does not support Shit or Ctrl selecting more than one file to open. when i need open 5 files from one folder, where is 20 files lets say, i would pick every with Ctrl and press Enter.
    why it has not this feature ? it’s good to have it !

  • Search and replace Selection (between Begin & End) in multiple files

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    Jan SchreiberJ

    Ah, fortunately the RegEx cavalry (a.k.a. @guy038) noticed this thread. I consider the problem solved. ;-)

  • Syntax colors

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Stefan TravisS

    Go to Language>Define Your Language.

    This will take you to N++'s “User Defined Language” window, for defining rules of syntax highlighting.

  • how can I add Launch in Edge to the Run/Launch Menu?

    3
    1 Votes
    3 Posts
    5k Views
    Putrid Carcass75P

    I been trying to do this as well. It took me a bit because edge doesn’t run from its exe file, but here’s how I did mine.–Launch to Edge Instructions–

  • 0 Votes
    3 Posts
    7k Views
    Pete NorrisP

    gerdb42;

    Thanks for responding to my question. I appreciate the information.

    PN

  • Spacing between number columns

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    Jan SchreiberJ

    I agree with @dail. Unless we are fundamentally misunderstanding @Vi-Tran, pretty much any editor on every OS should be able to do this.
    Open the Find and Replace dialog (in Notepad++ and most other applications it is mapped to the Ctrl+H shortcut), type in five spaces for “Search for” and one space for “Replace with”.

  • Change Backup path

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • How to run code

    Locked
    6
    0 Votes
    6 Posts
    28k Views
    Jon BlanchardJ

    Go to the Rhino Web Site, download the Rhino interpreter and follow the instructions for running it within the OS window. You can run little snippets, define and run functions and see the output immediately; kind of basic and lacking special environment vars that might be available in a browser, but still a valuable tool.

    The other option that I can think of is to create a template HTML doc to test Javascript in, that will take inputs and generate output (check out W3 Schools and their Javascript section for examples of how they do it).

  • NP++ don't change font

    Locked
    2
    0 Votes
    2 Posts
    5k Views
    Jon BlanchardJ

    Did you choose Global Styles in the Language list and set the Font and Font Size for each style in the Style list?

  • Command line plugin activation

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Search multiple words in xml

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    gerdb42G

    Not sure if I got this right: You are trying to remove PRODUCT Tags for a specific SUPPLIER_PID? If so try this:

    Go to Search->Replace Search for <PRODUCT mode="new">\R<SUPPLIER_PID>285129</SUPPLIER_PID>.*?</PRODUCT> Replace with nothing Select Regular Expressions. Make sure “. matches \r and \n” is checked Hit “Replace all”

    But if you have to do this kind of job on a regular basis, you may want to look for a Tool that is more specifically made for manipulation of XML by XPath.

  • Convert an email to a URL using a wildcard

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    gerdb42G

    Sure:

    Go to Search->Replace Search for ^.+@(.+)$ Replace with www.\1 Select Regular Expressions (Make sure “. matches \r and \n” is not selected) Klick “Replace all”
  • Image Alignment

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Need help for Search and replace feature TX

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Peter StotzP

    Hi, michel buart

    Open the Replace dialog (CTRL + H)
    Find what: Example_table on every data
    Replace with: Example_table\r\nOn every data
    check enhanced mode \r \n \t \x …

    peter