• Issue with "session.xml" in N++ v7.9 (portable)?

    11
    0 Votes
    11 Posts
    872 Views
    guy038G

    Hello, @gh-2017, @peterjones, @terry-r and All,

    @gh-2017 :

    I tried your batch file with few simplifications and it worked nice ! Thanks for sharing !

    Now, here is a more simple version of what you expect to, which uses a tiny executable file, named mtrw.exe ( Instructions in comments )

    @echo off REM -------------------------- IMPORTANT ----------------------------------- REM BEFORE executing this BATCH file : REM - DOWNLOAD the "mtr206b.zip" ARCHIVE from http://adoxa.altervista.org/minitrue/dl.php?f=bin REM - EXTRACT the "mtrw.exe" file in the LOCATION of this BATCH file REM ------------------------------------------------------------------------ REM Copy the "session.xml" file as "New.txt", WITHOUT any CONFIRMATION message copy /y session.xml New.txt > NUL REM ----------------------------------------------------------------------------------------------------------------------- REM Replace, in the "New.txt" file, the DRIVE letter and the COLON of each ABSOLUTE PATH in ALL "file..." tags with REM the CURRENT DRIVE letter and the COLON ( So, the TWO FIRST characters of the INTERNAL ENVIRONMENT variable %CD% ) REM REM (-x) Search REGEX mode by DEFAULT REM -qn QUIET mode and NO prompting REM -c- SENSIBLE to CASE REM -b- NO BACKUP file REM REM Type "mtrw" and ENTER for a QUICK summary REM Type "mtrw -?" and ENTER to open the HELP file REM Type "mtrw -?:Option and ENTER for HELP on a specific OPTION REM ----------------------------------------------------------------------------------------------------------------------- mtrw.exe -qn -c- -b- New.txt [A-Z]: = %CD:~0,2% REM STARTS Notepad++ and opens ALL the files contained in "New.txt", ONLY ! notepad++ -nosession -openSession New.txt

    Best Regards,

    guy038

  • Manipulations on many files

    22
    0 Votes
    22 Posts
    2k Views
    Rafal Jonca 0R

    @Alan-Kilborn said in Manipulations on many files:

    “XY problem”

    “XY problem” ? I made it and in this way you doubted. Any questions more ?

  • Odia text not rendered properly in NPP

    4
    0 Votes
    4 Posts
    505 Views
    Ajit NayakA

    Hello, @ekopalypse and @guy038
    Thank you very much for the quick response.
    The Solution provided by @guy038 completely solves the problem and now I can write anything in my language.
    So nice of you @guy038 to provide the solution with other research outputs that will further help us for using it effectively.
    with regards
    Ajit

  • Search in files

    8
    0 Votes
    8 Posts
    243 Views
    Alan KilbornA

    Searching the disk content of an open file is problematic…because, well, how does N++ do this type of searching?
    It opens the file into a tab that isn’t shown to the user, for each file searched. Since it can’t easily open two tabs for the same file (hmmm, cloned view does it, though…?), this type of thing isn’t allowed.

  • 0 Votes
    3 Posts
    482 Views
    guy038G

    Hello @robin-cruise and All,

    Why not this S/R :

    SEARCH (?-s)^\h*<div class="fb-comments" data-href=".+

    REPLACE <!-- Facebook Comments $0 -->

    Notes :

    This regex would search all contents of any line, beginning with the string <div class="fb-comments" data-href=, possibly predeced with any leading horizontal blank chars, and places this line in comments, with the syntax <!-- Facebook Comments ............... -->

    Not a very difficult regex : you could have found out this one, by yourself ;-))

    Best Regards,

    guy038

  • Examining a character?

    12
    0 Votes
    12 Posts
    16k Views
    guy038G

    Hi, @dave-joseph, @peterjones, @alan-kilborn and All,

    Peter, I confirm your test. In an UTF-8 file, without encoding problems, the option Encoding > Convert to ANSI correctly changes the two UTF-8 bytes of each smart quote, into a one ANSI byte

    Concerning the second point, I understand : seemingly it’s always better to see the individual bytes of a file with an external hex editor !

    Cheers,

    guy038

  • Extracting some elements from the string

    3
    0 Votes
    3 Posts
    156 Views
    Rafal Jonca 0R

    Works beautifully. Thank you :)

  • [v.7.8.6] Vertical Edge Settings no longer works with Split Lines (Ctrl-I)

    30
    0 Votes
    30 Posts
    4k Views
    dinkumoilD

    @Alan-Kilborn

    Yes, I discovered that already in the past. Increasing inter-line spacing is also possible with other styles, for example the Brace highlight style.

  • NPP will open file with one extension, but not another for same content

    5
    0 Votes
    5 Posts
    693 Views
    PeterJonesP

    @Paul-Hutson ,

    Yes, if you have either of those preference blanks set, then files of that type will always be opened as a session or workspace config XML, and Notepad++ won’t ever let you read/edit the raw data inside.

    See for reference Footnote 1 in “Sessions, Workspaces, and Projects” from npp-user-manual.org

  • 0 Votes
    15 Posts
    685 Views
    Alan KilbornA

    @Robin-Cruise said in replace / move numbers from one row to another with regular expression (in parentheses):

    by the way, on replace, what does it mean ?1(\3#)\2(\3#) (step by step, please) ?

    It’s fairly “easy”: :-)

    ?1 controls the rest of it: If capture group #1 was NOT matched, the replacement is “nothing” (aka deletion)

    If capture group #1 WAS matched, then the replacement consists of:

    opening parens: ( what was matched with capture group #3 a literal # closing parens: ) what was matched with capture group #2 opening parens: ( what was matched with capture group #3 a literal # closing parens: )
  • Systematic addition of text and the current file name into 320 files

    3
    0 Votes
    3 Posts
    214 Views
    mkupperM

    @Aaron-Mills - I use Windows command prompt’s built in scripting and GNU sed to do what you need. For example, start up command prompt and cd to the top directory of where your HTML files are. Run this command for /r %i in (*.htm) do @echo %~ni You will see a list with the file names for each *.htm files from the current directory on down.

    Let’s say you want to add a <title>file-name</title> element at the top of the <head> section of each file.

    for /r %i in (*.htm) do sed -i -r -e "s~(<head>)~\1\n<title>%~ni</title>~" "%i" del sed??????

    You asked for the file name. If you also want the file extension included in the title then use %~nxi
    If you want or need to use the full file path then it gets painful. While the full path is available using %~fi you can’t use it as-is in a regular expression as the path contains \ backslash characters. There are workarounds but that’s getting out of the scope of how to do this given my suggestion does not use Notepad++.

    The second line with del sed?????? removes the temporary files created by sed’s -i command line option which I used to do in-place editing of all the HTML files.

  • Excluding all of a Line when using Add / Replace

    8
    0 Votes
    8 Posts
    607 Views
    Steven WarrensS

    A BIG thanks to all for your help. It looks like I will be using several different combinations of suggestions offered here. Wish me luck and thanks again!!

  • Trouble with Windows XP

    7
    0 Votes
    7 Posts
    851 Views
    Juan Manuel Carrillo CamposJ

    Well, some time later I have reviewed and the versa 350 has pentium M processor, my very old device is also a Pentium III and got the same errors that ARI1972’s. I assume the VM are installed in a more recent hardware then they support the machine instructions that fail in P-III hardware. I use the version of NP++ that gives me the two exception errors but it works anyway. I’ll continue using my p-III until the device gets a “no-more” condition.

  • Search in folder (encoding)

    41
    0 Votes
    41 Posts
    4k Views
    EkopalypseE

    @gstavi said in Search in folder (encoding):

    If you will ever open regedit on a Hebrew Windows and see all the English content aligned right-to-left you would lose all respect to Microsoft.

    Maybe I should give it a try to finally be persuaded to switch to Linux :-D

  • Making fonts larger so old men can read

    4
    0 Votes
    4 Posts
    316 Views
    Alan KilbornA

    @Michael-DeLigny

    To be a bit more specific, these might be the settings you’ll want to experiment with:

    5dd3553b-ae2f-46a6-804c-3fec7b08f3f3-image.png

    Also: You can temporarily change the size of text by pointing your mouse at the window, holding the Ctrl key, and scrolling the mouse wheel in either direction.

    I don’t want to change the native format of the text I’m viewing

    This shows you have a basic misunderstanding about what text editing is and what a text editor does. @zanud clarifies nicely with:

    (None) of file types supported by Notepad++ have font-related properties. All font names, sizes, styles used by Notepad++ are for viewing only, and they are never stored in the files.

  • 'In Selection' grayed out in the find/replace box

    3
    1 Votes
    3 Posts
    1k Views
    PeterJonesP

    @mkupper ,

    I could be wrong, but this sounds like this recent discussion and also this earlier discussion. On those, I don’t know if anyone has bothered putting in an official github issue or not. But if what you describe is the same as those (especially the first I mentioned), and if there isn’t an existing issue in the repo, then maybe you would be willing to submit the report.

  • Why won't NPP open .txt files

    10
    0 Votes
    10 Posts
    8k Views
    EkopalypseE

    @wwwdeals said in Why won't NPP open .txt files:

    I’m surprised after 5 years this issue is still around.

    Unless there is a way to reproduce the cause, it is hard to fix I guess.

  • Delay in saving files after latest upgrade

    8
    0 Votes
    8 Posts
    1k Views
    pnedevP

    @Mario-Valle ,

    To avoid a potential data corruption in case of sudden power loss, Notepad++ since version 7.9.1 writes files directly to disk on save - no operating system RAM caching is used. This ensures that your files are really safely written to disk when you save them but writing to disk is slower than writing to RAM buffer.
    Now if your “disk” is slow in write speed then that might be the reason you are seeing such delay. By “disk” here I mean the non-volatile (persistent) media where your files are located.
    Mapped network drives, SD cards, USB drives are examples of medias (“disks”) that are relatively slow on write.

  • uploading files to nitrado

    4
    0 Votes
    4 Posts
    389 Views
    dinkumoilD

    @Kerry-Down

    I don’t know anything about nitrado, but i guess it’s a web hosting provider. Read the FAQ or the wiki of nitrado to learn how to configure SFTP or FTP access to your server. This forum is a support forum for Notepad++.

  • Notepad++ v 7.9.2 ignores "Print Line Number" preference

    3