• User Defined Language: Comment & Number vs. Keywords Lists

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    Jim DaileyJ

    @Christopher-Redmond

    Actually, I think you can define several #keywords in one delimiter style (separate them with spaces):

    Open = “#LASTCHANGE #OTHER #ANDMORE”
    Close = “((EOL)) ((EOL)) ((EOL))”

  • Fold line breaks after update to Notepad++ 7.2.2

    Locked
    8
    0 Votes
    8 Posts
    4k Views
    Claudia FrankC

    @MU-Software

    you would need a plugin like python script or lua script to automate this task
    becasue it is not a general setting but per buffer setting. Each time you open
    a new c/cpp file the property needs to be set.

    A python version would look like this

    def setFoldProperty(): if editor.getLexerLanguage() == 'cpp' and editor.getProperty('fold.cpp.comment.explicit') != '0': editor.setProperty('fold.cpp.comment.explicit', '0') def callbackLANGCHANGED(args): setFoldProperty() def callbackBUFFERACTIVATED(args): setFoldProperty() notepad.clearCallbacks() notepad.callback(callbackBUFFERACTIVATED, [NOTIFICATION.BUFFERACTIVATED]) notepad.callback(callbackLANGCHANGED, [NOTIFICATION.LANGCHANGED])

    If you haven’t installed python script plugin already than I would suggest
    to download the msi from here instead using plugin manager.

    If you want to have this script executed each time you start npp you need to change the python script configuration from LAZY to ATSTARTUP and the content of this script needs to be in a file called
    startup.py.

    Note, both, c and cpp lexer are identified as cpp.

    Cheers
    Claudia

  • Can't read the filenames in the tabs.

    5
    0 Votes
    5 Posts
    3k Views
    gstaviG

    From the code it seems that NP++ uses an old API that is no longer recommended by Microsoft for getting tabs fonts.
    GetStockObject with:
    SYSTEM_FONT or DEFAULT_GUI_FONT.
    There is also lots of logic for calculating rectangle size and some references for DPI that may have side effects.
    Extreme resolutions are definitely an issue for “classic GUI” apps.

    Do you get font that is much smaller than Menu font?
    What version of Windows?

    I doubt that you can override it without modifying NP++ source code.
    If you play around by customizing Window fonts you may be able to modify it, hopefully without destroying other things.

    Some developer with similar screen should enhance the code sometime.

  • regex: Search operators (like google)

    5
    0 Votes
    5 Posts
    4k Views
    guy038G

    Vasile and All,

    Ah, of course, Vasile, your regex I love \w{1,6}+ car contains the part \w{1,6}+, with the quantifier {1,6}, followed by a + sign. It represents an atomic sequence. That is to say that, ONCE the regex engine matches the greatest possible amount of word characters , up to 6, it would NEVER backtrack, in order to satisfy, possibly, the remainder of the overall regex !

    Actually, your regex would just match the 6 following lines, below, with, only, ONE word ( of 1 to 6 letters ), between the words love and car

    I love car I love 1 car I love 12 car I love 123 car I love 1234 car I love 12345 car I love 123456 car I love 1234567 car

    Here are, below, TWO regexes, looking for a range of words, between TWO boundaries-words, let’s say, WORD_1 and WORD_2, which would be, both, separated by, at least, M words and NO more than N words :

    WORD_1(\W+\w+){M,N}\W+WORD_2 WORD_1([^\w\r\n]+\w+){M,N}[^\w\r\n]+WORD_2

    The first syntax may match over several consecutive lines

    The second syntax forces the regex engine to match the two boundaries-words WORD_1 and WORD_2, on a SAME line

    One example :

    Let WORD_1 be the article I

    Let WORD_2 be the name car

    Let M and N be the values 2 and 5

    So, the two resulting regexes are :

    I(\W+\w+){2,5}\W+car I([^\w\r\n]+\w+){2,5}[^\w\r\n]+car

    => The first syntax matches the two complete lines, first, then the lines, from 3 to 6

    => The second syntax matches, ONLY, a UNIQUE line, from 3 to 6, below :

    I car ! I love car ! I love this car ! I love this blue car ! I love this nice blue car ! I love this very nice blue car ! I love this gleaming and very nice blue car !

    I would like to point out a special regex construction, which may, sometimes, help to get powerful matches. It’s the part [^\w\r\n] !

    Indeed, I, originally, considered the classical syntax \W+, to match any range of NON-words characters, which occurs before a word. However, as the class \W is the opposite of the \w class, the NON-word \W may, also, match any EOL character, like \n or \r, leading, sometimes, to matches on two consecutive lines !

    So, to find out the second case, I built this NEGATIVE class [^\w\r\n], that considers a character, which is, both, NOT a Word character AND neither the \n nor the \r EOL character !

    An other example : the regex [^\W_a-z] is a kind of double-negation construction : It, finally, matches any Word character, except for the underscore ( _ ) and all the usual lower-case letters ( [a-z] ). In other words, this regex would match :

    Any digit or number-like symbol

    Any upper-case letter, accentuated or NOT

    Any accentuated lower-case letter, ONLY

    Cheers,

    guy038

  • Notepad++ crashes my machine!

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Some Unicode characters disappear

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Claudia FrankC

    @Dennis-M-Marks

    as you writing java script and creating web pages I would say you need
    to read this.

    Cheers
    Claudia

  • Copy File Name BY Dragging

    2
    0 Votes
    2 Posts
    2k Views
    Claudia FrankC

    @William-Sunderman

    afaik, no - but are you sure you want to use npp to generate a file containing list of files?
    I don’t know but a simple dir command could do it as well I guess. Or are your files
    that different that it can’t match a certain filter?

    dir /B *.exe > c:\list_of_exes.txt

    Maybe create the list with the dir command and then use regex with npp
    to filter the ones you want?

    Cheers
    Claudia

  • Windows not recognizing Notepad++

    4
    0 Votes
    4 Posts
    3k Views
    Claudia FrankC

    @Placeholder

    permission issue ??
    What if you run Default program and set npp for the extension?
    Or what about running npp as administrator and do assignment via Settings->Preferences->File Association?

    Cheers
    Claudia

  • Lines in Notepad++

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    guy038G

    Hello, Jivko,

    Once, you get all your results in the Find result windows

    Select all your results, in the Find Result panel

    Right click, inside the Find Result panel

    Choose the Copy option

    Open a New tab

    Paste all the lines of your original text, which match your search

    => The string “Line ##:”, at beginning of each line, should not be present !

    Best Regards,

    guy038

  • need starter guides please if someone can help thx!

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Scott SumnerS

    @ניר-מולא

    Wrong place to ask that. Try…Google…?!!

  • 0 Votes
    4 Posts
    2k Views
    Claudia FrankC

    @Tal-Segal

    I’m under the impression that you are looking for something like e.g. snippets plugin, could this be?

    Cheers
    Claudia

  • Notepad for FreeFem

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    Claudia FrankC

    @Adriana-Maria-Castro-Sanchez

    First, is launchff++ a commandline executable? If so,
    call it with the commandline interpreter like

    cmd /k launchff++ “$(FULL_CURRENT_PATH)”
    (also consider using nppexec)

    If it is a win gui application, checkout if launchff++ can be executed to run the gui
    or if it is needed to put in the whole path.

    Cheers
    Claudia

  • How to not open last session when you have closed and re-open NotePad++

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    dvastonD

    Thanks perfect :)

  • Non-loading website

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Claudia FrankC

    @Sandra-Blebbings

    first of all, make clear what you want.
    You’re saying that the website is showing up and in the sub-clause you are saying it isn’t.
    Then describe the steps you’ve done clearly - how should we know what causes the problem
    if you don’t provide any useful information. Sorry.

    Cheers
    Claudia

  • Save As dialog box stuck in fullscreen

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Claudia FrankC

    @Brian-Edwards

    what about clicking into the top window area (don’t know the name currently, the area where save as appears)?
    It should open a menu where you can resize or restore (or something like that) the window.

    Cheers
    Claudia

  • replace in selected area

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    guy038G

    Hello , Gonen Shoham,

    Of course, it can -:))

    I noticed that, finally, you would like to change, ONLY, the lines which begin with a digit, wouldn’t you ?

    If so, you can achieve all your changes, in one go, with a regex Search-Replacement !

    Move back to the very beginning of your file ( Ctrl + Origin )

    Open the Replace dialog ( Ctrl + H )

    In the Find what: zone, type (?-s)^(?=\d)(\w+).+\W+(\w+)\W+(\w+)$

    In the Replace with: zone, type \1 \2 \3 , with a space character after digits 1 and 2

    Click on the Replace All button

    Et voilà !!

    NOTES :

    As usual, the in-line modifier (?-s) ensures you the any meta-character dot ( . ) will match standard characters, ONLY, and not EOL characters

    Then, the part ^(?=\d) is called a positive look-ahead, that is to say a condition which verifies that, at beginning ( ^ ) of each line, a digit ( \d ) does occur ( Note that this condition must be true, in order to valid the overall search regex. However, these look-arounds do not consume any character and the regex engine position is, still, at the very beginning of each line )

    So, the part (\w+) represents the first non-null range of word characters, of each line, which is stored as group 1, due to the parentheses

    Then, the part .+ stands for any non-null range of standard characters, till the regex engine reaches :

    A non-null list of NON-word characters ( \W+ ), followed by :

    A non-null range of word characters ( (\w+) ), stored as group 2, followed by :

    An other non-null list of NON-word characters \W+, followed by :

    An other non-null range of word characters ( (\w+) ), stored as group 3, finally followed by the end of the line ( $ )

    In replacement, we just re-write the contents of the three groups 1 ( first word ), 2 ( penultimate word ) and 3 ( last word ), separated by one space character.

    REMARKS* :

    The class \w represents, in the world-common ASCII range of characters, the class [A-Za-z0-9_], ( upper-case letters, lower-case letters, digits and the low line character ) But, if your present file has an Unicode encoding ( UTF-8 or UCS-2 ), the range of word characters ( \w ), in N++, is extended to any character, considered as letter or digit, in either, Latin, Greek, Cyrillic, Hebrew and Arab languages, correcty displayed with the Courrier New default N++ font !

    And the inverse class, \W, stands for any NON-word character, that is to say, any chracter, which does NOT belong to the word characters range

    So, from your example :

    *JSP - 060 N N 1309,com.sapiens.mig.ri.v050m00.RI17483,70 1309,com.sapiens.mig.ri.v050m00.RI17483,70 *SQL - 812 N N #SQL01 *DDC - 045 N N *JRN - 055 N N

    we would obtain the modified text, below :

    *JSP - 060 N N 1309 RI17483 70 1309 RI17483 70 *SQL - 812 N N #SQL01 *DDC - 045 N N *JRN - 055 N N

    Even if the non-selected lines begin with an othersymbol than the star, except for digits, AND/OR the different words are separated by several non-word characters, our S/R, always, behave as expected :-) For instance, if you consider the text, below, where I inserted numerous non-word characters, whose some space and tabulation characters, in the two lines, that have to be changed and where I changed the first character of the lines, which have to stay unchanged :

    +JSP - 060 N N 1309;com---sapiens~mig&ri>>>>>v050m00 RI17483,@@@@@@@70 1309:com"""sapiens===mig/ri!v050m00 RI17483%%%70 *SQL - 812 N N #SQL01 DDC - 045 N N JRN - 055 N N

    We, still, get the result, below !

    +JSP - 060 N N 1309 RI17483 70 1309 RI17483 70 *SQL - 812 N N #SQL01 DDC - 045 N N JRN - 055 N N

    Best Regards,

    guy038

  • How to keep spacing when converting file from plain text to rich text?

    5
    0 Votes
    5 Posts
    5k Views
    cipher-1024C

    When you “convert to rich text” I’m assuming you’re pasting the data into something else (Word?). I think all you need to do to maintain the columns is set the font on the pasted data to a fixed-width font like courier.

  • Search/replace function makes large file corrupted

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Notepad++ Copy and Paste

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    cmeriauxC

    debug info please

  • Why do not alt+ASCII give extended ASCII characters

    4
    0 Votes
    4 Posts
    7k Views
    Martin PerssonM

    I code 100% in UTF-8