• auto search

    Locked
    1
    0 Votes
    1 Posts
    769 Views
    No one has replied
  • how to link the resource file with Nppexec?

    6
    0 Votes
    6 Posts
    2k Views
    Imdjs FXI

    SET local MSSDK = E:/Microsoft Visual Studio 12.0/VC/Microsoft SDKs/Windows/v7.1A
    ENV_SET PATH =$(MSSDK)/bin/x64;$(SYS.PATH)
    SET local B_DIR = B:/$(NAME_PART)

    cmd /k chdir /d $(CURRENT_DIRECTORY) &rc /r /v /fo $(B_DIR).res $(NAME_PART).rc &EXIT

    //----------------------------------------------
    I finally figure out how to complie the .rc file with the sepecify output directory

  • How to use "installed" icon?

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    Steven BeederS

    Took me a moment to understand what you were saying but now I get it. That’s too bad. But now I know. Thanks for your response.

  • 0 Votes
    1 Posts
    767 Views
    No one has replied
  • search and replace for a newbie

    Locked
    16
    0 Votes
    16 Posts
    5k Views
    guy038G

    Hello, @barry-payne and All,

    Sorry to discuss about an already solved problem but I do think that your regex ^A.*110M00104(?!.*110M00104$) could be simply written :

    ^A.*110M00104

    Indeed, given your text, these two regexes give the same results : all lines from A0000 till 110M00104 are matched !

    A0000059700000001 000000012016101020161010NLEE 4 110M00104 DL2 Cross Roller Monthly PM A0000059700000001 000000012016101020161010NLEE 4 110M00104 A0000059700000001 000000012016101020161010NLEE 4 110M00104 SAFETY FIRST- USE LOCK OUT/TAG OUT PRIOR A0000059700000001 000000012016101020161010NLEE 4 110M00104 TO DOING THIS JOB A0000059700000001 000000012016101020161010NLEE 4 110M00104 A0000059700000001 000000012016101020161010NLEE 4 110M00104 Determine what energy sources will be A0000059700000001 000000012016101020161010NLEE 4 110M00104 locked out. (Electrical, Gas, Pneumatic, A0000059700000001 000000012016101020161010NLEE 4 110M00104 Hydraulic, Steam, Etc#) A0000059700000001 000000012016101020161010NLEE 4 110M00104 A0000059700000001 000000012016101020161010NLEE 4 110M00104 IF YOU ARE NOT SURE WITH THE ABOVE- SEE A0000059700000001 000000012016101020161010NLEE 4 110M00104 SUPERVISOR IMMEDIATELLY

    In your text, the string 110M00104 occurs once per line. So, once the first part ^A.*110M00104 has been matched, the negative look-ahead (?!.*110M00104$) is always true, because no more string 110M00104 occurs at the end of line !

    Even if we change the last line, in such a way :

    A0000059700000001 000000012016101020161010NLEE 4 110M00104 110M00104 SUPERVISOR IMMEDIATELLY

    Either, the regex ^A.*110M00104 or your regex ^A.*110M00104(?!.*110M00104$), would match the string A0000059700000001 000000012016101020161010NLEE 4 110M00104 110M00104

    If you, really, want to match a specific string ( for instance the string ABCD ) with the condition that no other string ABCD occurs, further on, in the same line, you should use the negative look-ahead (?!.*ABCD.*ABCD), evaluated, at beginning of the current line !

    So, given the simple example text below :

    A000 Line 1 12345 ABCD Some text after A000 Line 2 12345 ABCD ABCD A000 Line 3 12345 ABCD A000 Line 4 12345 ABCD ABCD Test

    The 3 regexes, below, do not match the lines 2 and 4 , which contain the string ABCD, twice :-)

    ^(?!.*ABCD.*ABCD)A.*ABCD matches between A000 and the unique occurrence of ABCD ( Line 1 and 3 )

    ^(?!.*ABCD.*ABCD)A.*ABCD(?=.) matches between A000 and the unique occurrence of ABCD, which does not end the line ( Line 1, only )

    ^(?!.*ABCD.*ABCD)A.*ABCD(?=\R) matches between A000 and the unique occurrence of ABCD, which ends the line ( Line 3, only )

    Of course, the four regexes, below, without the look-ahead, consider all the lines and, moreover :

    ^A.*ABCD matches between A000 and the last occurrence of the string ABCD ( Line 1 to 4 )

    ^A.*?ABCD matches between A000 and the first occurrence of the string ABCD ( Line 1 to 4 )

    ^A.*ABCD(?=.) matches between A000 and an occurrence of ABCD, which does not end the line ( Lines 1, 2 and 4 )

    ^A.*ABCD(?=\R) matches between A000 and an occurrence of ABCD, which ends the line ( Lines 2 and 3 )

    Best Regards,

    guy038

    P.S. :

    I forgot to mention that the . matches newline option must be UNTICKED, of course !

  • Help: Lost all unsaved files, where could they be?

    Locked
    2
  • Notepad++ BAT CMD Macros

    Locked
    4
    1 Votes
    4 Posts
    4k Views
    Claudia FrankC

    @Вася-Попов

    thought about it but don’t see that this can be achieved with npp builtin functions.
    By any chance, do you use some plugins like nppexec, python script or lua script?
    Then it might be possible to do things like

    for each file in directory
    run macro
    save/close file

    But to be honest, I wouldn’t do it using npp instead using a scripting language like perl, python etc…

    Cheers
    Claudia

  • Moving mouse pointer over a tab unintentionally tries to rearrange tab

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Claudia FrankC

    @Eamon-Holmes

    Hard to say - I never encountered this on my setups and if you can’t reproduce it as well …
    Which npp version do you use? (debug-info from ? menu)
    Btw. why don’t you execute the script from within npp? (run menu)

    Cheers
    Claudia

  • nppcrypt

    Locked
    2
    0 Votes
    2 Posts
    1k Views
  • Autobackups not working v7.5.4?

    3
    0 Votes
    3 Posts
    1k Views
    Claudia FrankC

    @Stuart-Halliday

    note sure if I understand correctly, do you mean the backup directory under
    session snapshot and periodic update (which cannot be changed easily) or
    the one under backup on save? If the latter is the case, then it should be possible
    to change. If it can’t, I would suggest to disable backup - restart npp and re-enable it.

    If you want to change the one under session snapshot…
    then there are only two ways as far as I know.
    Either you create a link named backup and which points to the directory of your choice
    or you use the cloud settings path.

    Cheers
    Claudia

  • "Sel" value is different from number of characters selected

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Claudia FrankC

    @zingiel

    which npp version (? menu->debug-info ) do you use and can you share an example file which shows this results?

    Cheers
    Claudia

  • search inside brackets

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Anita NieuwA

    GREAT, thank you very, very much! I’m happy :)

  • Can I make document tabs equal width?

    Locked
    4
    1 Votes
    4 Posts
    2k Views
    Scott SumnerS

    @Sunny-Time

    I’m not at all sure what that means (!), but if it helps, you can remove the X from the tabs by doing this:

    Click Settings menu Click Preferences… Click General in the box on the left In the Tab Bar area on the right, un-tick this option: Show close button on each tab
  • [PLUGIN] N++ jumps view on selecting a different line

    5
    0 Votes
    5 Posts
    2k Views
    Aleksi KolehmainenA

    Thanks! I did manage to figure out the word wrap solution on my own, even as I am a dummy. Looking forward to the next release! :)

  • UDL syntax tool runs out of gas

    3
    0 Votes
    3 Posts
    1k Views
    Reilly BurkeR

    Hi Claudia-

    Notepad++ v6.9.2
    Build time : May 18 2016 - 00:34:05
    Path : C:\Program Files (x86)\Notepad++\notepad++.exe
    Admin mode : OFF
    Local Conf mode : OFF
    OS : Windows 7
    Local language: SharkBase (VP-Info multi-user)

    Briefly, I started again from scratch, and this time the hi-lighting covered the entire file (about 600 lines). I possibly made some kind of syntax error when defining my language, or perhaps a recent NPP update fixed it. I will never know which it was. Regardless, in spite of its defining shortcomings, it’s a useful tool with lots of potential. i will keep working with it for now.

  • RegEx Expression to count a WORD in LINES

    Locked
    4
    1 Votes
    4 Posts
    5k Views
    Elijah 5801E

    I’m so appreciate this forum, the pros have solved two RegEx problems for me this weekend.

    Thanks to Scott and Guy038.

    Interestingly both your methods works perfectly.

  • How to place all bookmarked lines in document on the top

    Locked
    2
    1 Votes
    2 Posts
    853 Views
    Scott SumnerS

    @Rana-Jawad

    Not hard if you know about the Bookmark menu:

    Cut your bookmarked lines (see Search (menu) -> Bookmark -> Cut Bookmarked Lines) Move caret to top of document Paste
  • 0 Votes
    2 Posts
    6k Views
    guy038G

    Hello, @jaack-mcmahon, and All,

    Here, is, bellow, a NON-exhaustive table of some Unicode characters, with code-point, above 007Fh, taken from the following Unicode blocks :

    Latin 1 Supplement General Punctuation Mathematical Operators Miscellaneous Symbols Specials

    which can be replaced by a similar standard ASCII character, with code-point < 0080h :

    +--------------------------------------------------------------+---------------------------------------------+ | NON-ASCII Character with Code > \x{007F} | Similar Character(s) with Code < \x{0080} | +--------------------------------------------------------------+---------------------------------------------+ | Code | Char | Character Name | Code | Char | Character Name | +--------+------+----------------------------------------------+--------+---------+--------------------------+ | 00A0 |   | NO-BREAK SPACE | 0020 | | SPACE | | 00A6 | ¦ | BROKEN BAR | 007C | | | VERTICAL LINE | | 00AB | « | LEFT-POINTING DOUBLE ANGLE QUOTATION MARK | 0022 | " | QUOTATION MARK | | 00AD | ­ | SOFT HYPHEN | 002D | - | HYPHEN-MINUS | | 00B4 | ´ | ACUTE ACCENT | 0027 | ' | APOSTROPHE | | 00B7 | · | MIDDLE DOT | 002E | . | FULL STOP | | 00BB | » | RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK | 0022 | " | QUOTATION MARK | | 00BC | ¼ | VULGAR FRACTION ONE QUARTER | | 1/4 | | | 00BD | ½ | VULGAR FRACTION ONE HALF | | 1/2 | | | 00BE | ¾ | VULGAR FRACTION THREE QUARTERS | | 3/4 | | | 00D7 | × | MULTIPLICATION SIGN | 0078 | x | LATIN SMALL LETTER X | +--------+------+----------------------------------------------+--------+---------+--------------------------+ | 2000 |   | EN QUAD | | \x20{2} | | | 2001 |   | EM QUAD | | \x20{4} | | | 2002 |   | EN SPACE | | \x20{2} | | | 2003 |   | EM SPACE | | \x20{4} | | | 2004 |   | THREE-PER-EM SPACE | 0020 | | SPACE | | 2005 |   | FOUR-PER-EM SPACE | 0020 | | SPACE | | 2007 |   | FIGURE SPACE | | \x20{2} | | | 2008 |   | PUNCTUATION SPACE | 0020 | | SPACE | | 2010 | ‐ | HYPHEN | 002D | - | HYPHEN-MINUS | | 2011 | ‑ | NON-BREAKING HYPHEN | 002D | - | HYPHEN-MINUS | | 2012 | ‒ | FIGURE DASH | | -- | | | 2013 | – | EN DASH | 002D | - | HYPHEN-MINUS | | 2014 | — | EM DASH | 002D | - | HYPHEN-MINUS | | 2015 | ― | HORIZONTAL BAR | 002D | - | HYPHEN-MINUS | | 2016 | ‖ | DOUBLE VERTICAL LINE | | || | | | 2018 | ‘ | LEFT SINGLE QUOTATION MARK | 0027 | ' | APOSTROPHE | | 2019 | ’ | RIGHT SINGLE QUOTATION MARK | 0027 | ' | APOSTROPHE | | 201A | ‚ | SINGLE LOW-9 QUOTATION MARK | 002C | , | COMMA | | 201B | ‛ | SINGLE HIGH-REVERSED-9 QUOTATION MARK | 0060 | ` | GRAVE ACCENT | | 201C | “ | LEFT DOUBLE QUOTATION MARK | 0022 | " | QUOTATION MARK | | 201D | ” | RIGHT DOUBLE QUOTATION MARK | 0022 | " | QUOTATION MARK | | 201E | „ | DOUBLE LOW-9 QUOTATION MARK | | ,, | | | 201F | ‟ | DOUBLE HIGH-REVERSED-9 QUOTATION MARK | 0022 | " | QUOTATION MARK | | 2022 | • | BULLET | 002E | . | FULL STOP | | 2024 | ․ | ONE DOT LEADER | 002E | . | FULL STOP | | 2025 | ‥ | TWO DOT LEADER | | .. | | | 2026 | … | HORIZONTAL ELLIPSIS | | ... | | | 2032 | ′ | PRIME | 0027 | ' | APOSTROPHE | | 2033 | ″ | DOUBLE PRIME | | '' | | | 2034 | ‴ | TRIPLE PRIME | | ''' | | | 2035 | ‵ | REVERSED PRIME | 0060 | ` | GRAVE ACCENT | | 2036 | ‶ | REVERSED DOUBLE PRIME | | `` | | | 2037 | ‷ | REVERSED TRIPLE PRIME | | ``` | | | 2039 | ‹ | SINGLE LEFT-POINTING ANGLE QUOTATION MARK | 003C | < | LESS-THAN SIGN | | 203A | › | SINGLE RIGHT-POINTING ANGLE QUOTATION MARK | 003E | > | GREATER-THAN SIGN | | 203D | ‽ | INTERROBANG | | !? | | | 2044 | ⁄ | FRACTION SLASH | 002F | / | SOLIDUS | +--------+------+----------------------------------------------+--------+---------+--------------------------+ | 2212 | − | MINUS SIGN | 002D | - | HYPHEN-MINUS | | 2215 | ∕ | DIVISION SLASH | 002F | / | SOLIDUS | | 2216 | ∖ | SET MINUS | 005C | \ | REVERSE SOLIDUS | | 2217 | ∗ | ASTERISK OPERATOR | 002A | * | ASTERISK | | 2223 | ∣ | DIVIDES | 007C | | | VERTICAL LINE | | 2225 | ∥ | PARALLEL TO | | || | | | 2227 | ∧ | LOGICAL AND | 005E | ^ | CIRCUMFLEX ACCENT | | 2228 | ∨ | LOGICAL OR | 0056 | V | LATIN CAPITAL LETTER V | | 222A | ∪ | UNION | 0055 | U | LATIN CAPITAL LETTER U | | 2236 | ∶ | RATIO | 003A | : | COLON | | 2237 | ∷ | PROPORTION | | :: | | | 2239 | ∹ | EXCESS | | -: | | | 223C | ∼ | TILDE OPERATOR | 007E | ~ | TILDE | | 2254 | ≔ | COLON EQUALS | | := | | | 2255 | ≕ | EQUALS COLON | | =: | | | 2264 | ≤ | LESS-THAN OR EQUAL TO | | <= | | | 2265 | ≥ | GREATER-THAN OR EQUAL TO | | >= | | | 226A | ≪ | MUCH LESS-THAN | | << | | | 226B | ≫ | MUCH GREATER-THAN | | >> | | | 2276 | ≶ | LESS-THAN OR GREATER-THAN | | <|> | | | 2277 | ≷ | GREATER-THAN OR LESS-THAN | | >|< | | | 22C0 | ⋀ | N-ARY LOGICAL AND | 005E | ^ | CIRCUMFLEX ACCENT | | 22C1 | ⋁ | N-ARY LOGICAL OR | 0056 | V | LATIN CAPITAL LETTER V | | 22C3 | ⋃ | N-ARY UNION | 0055 | U | LATIN CAPITAL LETTER U | | 22C5 | ⋅ | DOT OPERATOR | 002E | . | FULL STOP | | 22C6 | ⋆ | STAR OPERATOR | 002A | * | ASTERISK | | 22D8 | ⋘ | VERY MUCH LESS-THAN | | <<< | | | 22D9 | ⋙ | VERY MUCH GREATER-THAN | | >>> | | | 22EF | ⋯ | MIDLINE HORIZONTAL ELLIPSIS | | ... | | +--------+------+----------------------------------------------+--------+---------+--------------------------+ | 2639 | ☹ | WHITE FROWNING FACE | | :-( | | | 263A | ☺ | WHITE SMILING FACE | | :-) | | +--------+------+----------------------------------------------+--------+---------+--------------------------+ | FFFD | � | REPLACEMENT CHARACTER | 003F | ? | QUESTION MARK | +--------+------+----------------------------------------------+--------+---------+--------------------------+

    Now, let’s suppose that, from the list, below, you would like to replace these 14 Unicode characters, on the left, with their similar standard character, on the right :

    | 00A6 | ¦ | BROKEN BAR | 007C | | | VERTICAL LINE | | 00BD | ½ | VULGAR FRACTION ONE HALF | | 1/2 | | | 2000 |   | EN QUAD | | \x20{2} | | | 2001 |   | EM QUAD | | \x20{4} | | | 2018 | ‘ | LEFT SINGLE QUOTATION MARK | 0027 | ' | APOSTROPHE | | 2019 | ’ | RIGHT SINGLE QUOTATION MARK | 0027 | ' | APOSTROPHE | | 201C | “ | LEFT DOUBLE QUOTATION MARK | 0022 | " | QUOTATION MARK | | 201D | ” | RIGHT DOUBLE QUOTATION MARK | 0022 | " | QUOTATION MARK | | 203D | ‽ | INTERROBANG | | !? | | | 2264 | ≤ | LESS-THAN OR EQUAL TO | | <= | | | 2265 | ≥ | GREATER-THAN OR EQUAL TO | | >= | | | 2639 | ☹ | WHITE FROWNING FACE | | :-( | | | 263A | ☺ | WHITE SMILING FACE | | :-) | | | FFFD | � | REPLACEMENT CHARACTER | 003F | ? | QUESTION MARK |

    Then :

    Open the Replace dialog, in N++ ( Ctrl + H )

    Type in the regex (¦)|(½)|( )|( )|(‘)|(’)|(“)|(”)|(‽)|(≤)|(≥)|(☹)|(☺)|(�), in the Find what: zone

    Type in the regex (?1|)(?{2}1/2)(?3\x20\x20)(?4\x20\x20\x20\x20)(?5')(?6')(?7")(?8")(?9!?)(?{10}<=)(?{11}>=)(?{12}\:-\()(?{13}\:-\))(?{14}?), in the Replace with: zone

    Tick the Wrap around option

    Select the Regular expression search mode

    Click, once , on the Replace All button, or several times on the Replace button

    Et voilà !

    Notes :

    In search, we, simply, put each character, to be replaced, between round parentheses, in order to be stored as group 1, 2 and so on…

    In replacement, we use a special conditional syntax (?#xxxx:yyyy) or (?{#..#}xxxx:yyyy), where :

    # or #...# represents a group number

    The part xxxx is rewritten, if group # or #...# exists

    The part yyyy is rewritten, if group # or #...# does not exist

    In our case, the ELSE part, in each conditional replacement, is not present

    If a part xxxx or yyyy contains the character :, ( or ), it must be escaped ( preceded ) with a \ symbol

    For the second conditional replacement, I used the syntax (?{2}1/2), on purpose ! Indeed, if I would have used the (?21/2) syntax, the regex engine would have, wrongly, tried to replace any searched group 21 with the /2 string !!

    To end with, note that quantifiers, as {#}, do not work, in replacement. So we need to change, for instance, the \x20{2} syntax ( 2 space characters) by the simple \x20\x20 one !

    Best Regards,

    guy038

  • Counting Characters

    4
    0 Votes
    4 Posts
    32k Views
    Gogo NeatzaG

    Notepad-plus-plus can do better. Check the View menu - Summary.
    This is the report about my test file:
    “Summary
    Characters (without blanks): 210
    Words: 10
    Lines: 10
    Current document length: 228
    9 selected characters (9 bytes) in 2 ranqes”

    The last line is displayed because I had two selected blocks at the time I wanted the ‘Summary’.

  • Print Preferences for the header - BOLD and Italics won't save

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    cipher-1024C

    All I can do is confirm this is the behavior I see on my machine. I tried removing the header information and re-adding it but nothing seems to make the Italic setting stick.

    On a separate note, I’m curious why the European company got your code in pdf. The only reason I can think of that the line spacing/header info would make a hoot of difference would be if you’re trying to compare the old code with the new code side-by-side. Can’t you just take your copy (not pdf) of the old code and the current version and stick them in WinMerge and send them a diff file? You cold even make the diff file a pdf if that’s some sort of company requirement for sending them code. I hate to side track a topic, but I just had to ask.