• Regex to change numbers to a value 1 step lower

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    guy038G

    Hello, @pablo-martinez,

    I’ve just missed your post, till now ! Really easy, indeed !

    The search regex is unchanged (0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9)

    The replacement regex becomes (?{1}9)(?{2}0)(?{3}1)(?{4}2)(?{5}3)(?{6}4)(?{7}5)(?{8}6)(?{9}7)(?{10}8)

    Remark : I noticed that, in your previous regex, when you add 1 to digit 9, you get the 0 digit ( part (?{10}0), at the end of your previous replacement regex ).

    So, to stay coherent, with that method, now, if you subtract 1 from 0, you’ll get the number 9 ( part (?{1}9), at the beginning of the new replacement regex ! )

    Best Regards,

    guy038

  • Web site

    Locked
    2
    -1 Votes
    2 Posts
    1k Views
    Claudia FrankC

    @Pierre-Namikaze

    By learning the “web” language of your choice and
    understanding what needs to be done to set up a webpage.

    Good starting points are
    https://www.w3schools.com/default.asp
    and
    https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_is_a_web_server

    Cheers
    Claudia

  • Messed up my settings. Help.

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Claudia FrankC

    @Don-Bonnenfant

    depending on your usage and configuration you need to do different actions.
    If you use a customized theme/style then you need to download a zipped npp version
    and extract the theme into your installation. If you use the the default theme/style then
    you can rename the file stylers.xml, which is either in your installation directory or under
    %APPDATA%, and then start npp. The file will be recreated with the default settings.

    Cheers
    Claudia

  • leave each Nth line, if contains .... (in script)

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Claudia FrankC

    @Gonen-Shoham

    in addition to what Guy already mentioned, it would be good to know what kind of
    scripting language you are thinking of.

    Cheers
    Claudia

  • Formatting options in Notepad++

    Locked
    2
    0 Votes
    2 Posts
    11k Views
    Claudia FrankC

    @Suhas-kashyap-R.R

    You can make it work but you need to understand that this isn’t a persistent change which means
    if you close and reopen the file, the changes are gone. This is related to the fact that npp is a text
    editor and unlike word processors like MS Word, LibreOffice Writer it doesn’t save formatting
    information within the file. The coloring you see for programming languages like c/c++, python …
    are done on the fly and as already said, don’t persist on reload.

    So if you are still interested, then a possible solution might be to install python script plugin and
    define your own styles for different kind of actions.

    Cheers
    Claudia

  • Help with Regex to delete a block in paragraph/line

    Locked
    6
    0 Votes
    6 Posts
    3k Views
    du pD

    @guy038
    Thank you for the thorough explanation

    (?-si)<block.*?> works better than expected for me, even when inside the <block…> exceed 20 characters.

  • Trying to edit a read only file

    Locked
    3
    1 Votes
    3 Posts
    2k Views
    guy038G

    Hello, @kim-beach and All,

    May be I’m wrong but I’ll give a try !

    The coloured icon, at the left of the file name, in tabs, may be :

    Blue, if it refers to a saved file, which has not been modified, since that time

    Red, if it refers to a modified file, which has not been saved, since that time

    Grey, if it refers to a file, with the N++ temporary flag Read-Only “ON” ( See the option Edit > Set Read-Only )

    Just note that this N++ option is independent from the classical Read-Only flag of Windows. This N++ option is cancelled, as soon as you close the file or Notepad++. It just stays active, during the current N++ session, and prevents you for modifying the file, in any way !

    I hope that it’s related to your problem !

    Best Regards,

    guy038

  • How to display only rows that contain the number "300000"

    Locked
    3
    0 Votes
    3 Posts
    17k Views
    guy038G

    Hello, @djmcg, @scott-sumner and All,

    I said, in that other post, below, that finding all files, which do not contain a specific string, was not easy, with our Boost regex engine and that we need to use a work-around to get the right results. However, we can easily build a regex which find all lines of files, which do not contain a specific string ! And, then, delete them, as and when :-))

    https://notepad-plus-plus.org/community/topic/14870/regex-find-all-files-that-do-not-contain-some-words/2

    In your example, this specific string seems to be the number 300000, preceded by a semicolon

    So, the regex S/R, below, should keep only lines containing the string ;300000 :

    SEARCH (?-s)(?!.*;300000)^.*\R

    REPLACE Leave EMPTY

    OPTIONS Regular expression and Wrap around checked

    => It remains, only lines that contain the string ;300000. Et voilà !

    Notes :

    The first part (?-s) modifier means that dot will match any standard character, only and NOT the line breaks

    The last part ^.*\R is the range of characters to search for, that is to say, all characters of a line, even empty, along with its End of Line character(s)

    And, thanks to the middle part (?!.*;300000), which is a negative look-ahead, this search will be true, ONLY IF the string ;300000 cannot be found, from beginning of line, in the current line scanned

    And, as the Replacement part is empty, these lines are simply deleted

    As you see, you’ve got 4 solutions, to get the job done :

    With the LineFilter2 plugin

    With bookmarks

    With the Find result panel

    With regex S/R

    Enjoy N++ !!

    Cheers,

    guy038

  • Load langs.xml, stylers.xml failed

    Locked
    3
    1 Votes
    3 Posts
    6k Views
    Hayle BobH

    Hello Scott,

    Wild guess: What’s missing is the files langs.xml and stylers.xml ? :-D
    :-) perfect answer

    i re-installed Notepad++ using the 64Bit Installer and it works perfect

    thanks for the fast help

    Michael

  • Mouse pointer disappears when over line number/bookmark column

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Eric ThirolleE

    OK, so… I was wrong :-): CursorFX does have some kind of background process (some deets here: http://www.shouldiremoveit.com/CursorFX-6963-program.aspx). After uninstalling CursorFX & rebooting my laptop, the issue has resolved: I can now see my mouse pointer when it is over that line number & bookmark column.

    Cheers,
    Eric

  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • Any way to get past the 30 recent file history limit in notepad++?

    Locked
    7
    0 Votes
    7 Posts
    5k Views
    Scott SumnerS

    @vorticusbot

    Did you see my screenshot here where I have 35 items on the recent file history list by editing config.xml and changing the value to 35 before running Notepad++?

  • arquivos no notepad++ não abrem

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Batch automate "Find in Files"

    Locked
    3
    2 Votes
    3 Posts
    3k Views
    Jim DaileyJ

    @Hasso-Falisco

    Suppose you have a file named FilesToFind.txt that contains:

    filenameA filenameB filenameC

    Open a command window in the directory you want to search. Then enter this command:

    for /F %F in ('type FilesToFind.txt') do @dir /b %F

    If you also want to search in sub-directories, use:

    for /F %F in ('type FilesToFind.txt') do @dir /s /b %F

    That will spit out a list of the files that exist, which you may be able to use effectively.

  • Unwanted Tab Insertions

    Locked
    6
    1 Votes
    6 Posts
    2k Views
    Jennifer ThompsonJ

    @dail THAT DID IT!! Thank you!! @Scott-Sumner I didn’t see his suggestion until after I saw yours. Then I had to wait to post my thanks as I am but a fledgling on here.
    Thanks community!

  • Hello Can someone make a js and html5 file for mario? for me???

    Locked
    2
    -3 Votes
    2 Posts
    948 Views
    Onur GencO

    why no one explain

  • Convert to lowercase in xml text

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    Stefan KrumovS

    Wow man! You made me very happy indeed :) Thanks so much

  • DSpellChecker not working

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    alindbergA

    It seems that the Hunspell dictionaries did not install. Just a simple matter of selection the dictionary required and install.

    Now the nice red squiggles are everywhere telling me how bad my typing is… :-).

    Thanks.

  • Automatic indentation for Python

    3
    0 Votes
    3 Posts
    3k Views
    CutterXYZC

    Sorry, I don’t know much about language definitions for NPP, but aren’t indentation rules supposed to be part of them?

  • In UTF-8 saved files ara always open in ANSI

    Locked
    1
    0 Votes
    1 Posts
    958 Views
    No one has replied