• Session & Backups not being saved

    6
    0 Votes
    6 Posts
    357 Views
    EkopalypseE

    @Luke-Parkes-Haskell

    Can you try renaming your %APPDATA%\notepad++ directory temporarily and then run npp to see if that solves the problem?

  • Truncate find results lines

    6
    2 Votes
    6 Posts
    2k Views
    Alan KilbornA

    @fred-zept said in Truncate find results lines:

    I already tried doing the copy option, but when I paste lines somewhere else, I still get them truncated.

    Well, there is another way, assuming you are doing a search in a single document.
    You can use the Mark dialog to put a bookmark on each line that has a match, then use a command to copy bookmarked lines.
    Obviously, then pasting what you’ve copied to a fresh tab gives you the long lines in their entirety.

    Here’s the procedure:

    Make sure the Display Bookmark checkbox is ticked in Settings menu > Preferences > Editing

    Invoke Mark… either on the Search menu or by its default keycombo of Ctrl+m.

    Fill out your search information to find what you want.

    Additionally, Tick the Bookmark line checkbox.

    Press the Mark All button.

    Select the Copy Bookmarked Lines command from the Search menu’s Bookmark submenu.

    Paste your copied lines somewhere else for further processing.

  • Interesting 'Recent Files' menuing situation

    7
    1 Votes
    7 Posts
    359 Views
    Alan KilbornA

    My thought on the english_customizable was that maybe a typo (maybe one of the ID numbers got changed) or misbalanced quotes or angle-brackets has caused confusion in the parser, creating the second menu.

    Hmm, a localization change doesn’t create menus/items, so I fail to see how this could happen, but I guess anything is possible.

    Or maybe you have two <History> sections in config.xml.

    Verified as a No, I don’t.

    Well, either a restart of N++ or a changing to English caused the duplicate-but-blank menu item to disappear.
    BUT…I’ve seen it before, so I know that it will likely reappear.
    I’ll keep an eye out for its return and see if I can figure out more about it and what might cause it.

    Thanks to those that offered input.

  • Help about text find and replace

    3
    0 Votes
    3 Posts
    200 Views
    Matteo SalviatoM

    @guy038 said in Help about text find and replace:

    Open the Replace dialog ( Ctrl + H )

    SEARCH (?-si)“txt”:\x20"(.+?)"

    REPLACE “txt”:\x20""

    Tick the Wrap around option, preferably

    Select the Regular expression search mode

    Click on the Replace All button

    Thanks a lot!!! it works very well!!!

  • About editing .sol files

    5
    0 Votes
    5 Posts
    3k Views
    kissofkillK

    @andrecool-68 I thought maybe there was a plugin for it, I thought it was a basic text file.

  • replace only half of XML nodes

    2
    0 Votes
    2 Posts
    157 Views
    guy038G

    Hello, @ronen-neumark and All,

    OK ! So, given this template :

    <programme start="20201019000000" stop="20201019003000" channel="4" external_id="4_FR2_11414656841971"> ... ... ... </programme> <programme start="20201019003000" stop="20201019010000" channel="4" external_id="4_FR2_255393467237"> ... ... ... </programme> <programme start="20201019010000" stop="20201019013000" channel="4" external_id="4_FR2_347177048622"> ... ... ... </programme> <programme start="20201019013000" stop="20201019020000" channel="4" external_id="4_FR2_4358572412818"> ... ... ... </programme>

    The following regex S/R would replace the external_id value with the litteral string 4_FR9_99999999999999, only one time out of two !

    SEARCH (?-s)(<programme.+external_id=").+(?s)(".+?</programme>\R<programme.+?</programme>)

    REPLACE ${1}4_FR9_99999999999999${2}

    And should give the expected result :

    <programme start="20201019000000" stop="20201019003000" channel="4" external_id="4_FR9_99999999999999"> ... ... ... </programme> <programme start="20201019003000" stop="20201019010000" channel="4" external_id="4_FR2_255393467237"> ... ... ... </programme> <programme start="20201019010000" stop="20201019013000" channel="4" external_id="4_FR9_99999999999999"> ... ... ... </programme> <programme start="20201019013000" stop="20201019020000" channel="4" external_id="4_FR2_4358572412818"> ... ... ... </programme>

    My regex also works with this simplified example !

    Best Regards,

    guy038

  • What does "Save" button in the Window panel do?

    20
    1 Votes
    20 Posts
    4k Views
    Dennis64xD

    @Ekopalypse Thank you for everything. Have a good sleep :)

  • DSpellChecker Keyboard Shortcuts

    2
    0 Votes
    2 Posts
    1k Views
    EkopalypseE

    @David-Findlay

    You can assign a shortcut. Goto Settings->Shortcut Mapper->Plugins

    cc1ba6eb-9ee0-4146-b64c-aa81f377c56a-image.png

    Or you can select Spell Check Document Automatically from DSpellChecks plugins menu

  • Automatically tab cursor to specific column

    3
    0 Votes
    3 Posts
    328 Views
    EkopalypseE

    @NSDurant

    Should this work for lines which don’t have 40 characters yet too?
    If not, record a macro. Pos 1 + 40 times arrow right.

  • Keep Search Window Open all the time

    10
    1 Votes
    10 Posts
    3k Views
    Alan KilbornA

    @Aliaksandr3by

    The new way (7.9) to do this is in the Preferences on the Searching page.
    See Find dialog remains open after search that outputs to results window.
    Tick that box.

  • How to filter incorrect html tags with Notepad++?

    5
    0 Votes
    5 Posts
    799 Views
    NZ SelectN

    Thank you so much for the detailed guide.

  • Building my own IDE using Notepad++

    3
    0 Votes
    3 Posts
    591 Views
    PeterJonesP

    @Bunnarak-Theng ,

    If you are tasked with building an IDE at school, I doubt they would look favorably upon you just downloading someone else’s IDE and using it.

    That project sounds pretty advanced for a novice coder, and if that novice coder has so little insight into the practice that he would consider asking someone else to just hand him the solution, I would recommend that the novice go talk to his instructor and say, “I do not know how to start this project. I seem to be missing something fundamental to the project at this point. Can you point me to prerequisite classes that have prepared me for this, or to the portions of this class so far that has given me the information I need to make a start on this project?”

    If I were a professor who had given this project to a class of students who I believed were prepared for this task, and one or more of those students instead tried to pass off a complete application downloaded off the internet as their own work, I would fail them immediately, and recommend that they not bother continuing in their educational studies until they are willing to learn and do the work themselves.

    In my experience, professors love it when students come to them with well-thought-out questions, and hate it when students try to pass off someone else’s work as their own.

    I hope you take this advice to heart; good luck in your studies.

  • Mass replace and multiply at the same time

    10
    0 Votes
    10 Posts
    3k Views
    Alan KilbornA

    @Nick-Brown

    Yea, often posters just paste data into a posting without knowing what mangling a web site is going to do to it.

    We recommend data be posted as a “code block” with the </> button in the composing toolbar, but asking for this seems to mystify a lot of people.

  • Open / Save as etc. dialogs NP++ vs. Windows native

    5
    0 Votes
    5 Posts
    247 Views
    Andreas GiesenA

    @Alan-Kilborn Thank you! That’s it… :) Since the blank dialogs only occur with the “old style” dialog, that should be no problem any more…

  • SendKeys command does not run the macro using "objShell.SendKeys ("^+8"")

    2
    0 Votes
    2 Posts
    295 Views
    EkopalypseE

    @Suvendu-Mullick

    and this worked previously?? What did change?

  • Changing color of text highlighted is broken

    6
    0 Votes
    6 Posts
    614 Views
    Alan KilbornA

    @Evgeny-Morozov

    Please restore your first posting in this thread.

    Please don’t create other threads that are just a duplicate ( https://community.notepad-plus-plus.org/topic/20156/how-to-change-color-of-letters-of-highlighted-text )

  • Batch Replacment

    3
    0 Votes
    3 Posts
    1k Views
    PeterJonesP

    @zlab-dxb ,

    Notepad++ is a text editor, not a spreadsheet application. If you have an Excel file (.xlsx or similar extension), Notepad++ was not designed to handle that binary format, because Notepad++ is a text editor. I might recommend LibreOffice Calc or OpenOffice Calc as a free, open source spreadsheet program.

    If what you have is a CSV file, then Notepad++ could theoretically open it, but so could the aforementioned free, open source spreadsheet programs. And oddly enough, spreadsheet programs are built to handle spreadsheets quite well.

    If you really insist on editing a CSV spreadsheet in Notepad++, it could be done, though how complicated depends on your data, which you didn’t bother showing (if there is a comma in either column A or column B, things just got more complicated than I am going to help with)

    For example, if you want to replace TWO from column A with whatever is in column B for that row in the CSV below:

    COLUMN A,COLUMN B,COLUMN C ONE, 1.618, phi TWO, 2.718281828, e THREE, 3.14159, TWO, 2.0 END

    You could use

    FIND = (?-s)^TWO, (.*?)(?=,|$) REPLACE = $1, $1 Mode = regular expression REPLACE (twice) or REPLACE ALL (once) COLUMN A,COLUMN B,COLUMN C ONE, 1.618, phi 2.718281828, 2.718281828, e THREE, 3.14159, 2.0, 2.0 END

    @Terry-R beat me to most of the overhead/caveats. I included one possible example to show how it might be done; with a simple CSV, you’d just have to use whatever data you wanted to match from COLUMN A instead of TWO. But depending on your data, it will be more complicated than I showed.

    Please follow the advice below if you want help customizing this for your data.

    ----

    Do you want regex search/replace help? Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you. All example text should be marked as plain text using the </> toolbar button or manual Markdown syntax. Screenshots can be pasted from the clipboard to your post using Ctrl+V to show graphical items, but any text should be included as literal text in your post so we can easily copy/paste your data. Show the data you have and the text you want to get from that data; include examples of things that should match and be transformed, and things that don’t match and should be left alone; show edge cases and make sure you examples are as varied as your real data. Show the regex you already tried, and why you thought it should work; tell us what’s wrong with what you do get… Read the official NPP Searching / Regex docs and the forum’s Regular Expression FAQ. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries.

  • Often nothing happens when double clicking on find in files results

    15
    0 Votes
    15 Posts
    4k Views
    guy038G

    Hi, @mario-valle, @peterjones, @alan-kilborn and All,

    I think that I understood the problem !

    The bug occurs whatever the type of search is run ( Find All in Current Document, Find All in All Opened Documents or Find All ) I could reproduce the problem with N++ v7.8.5, 32 bits and the last version v7.9.0, 32 bits

    It does not depend of the search mode Normal or Regular expression nor of the Word Wrap feature

    Briefly : When the search concerns an expression, in a line of more than 1,002 characters and that you process successive searches, let’s say, 3 times, for the same expression or even an other one, a double-click on this long line, in the Find Result panel, moves to the concerned line of the concerned file, ONLY for the FIRST of the searches done ! Any double-click on this long line, in the subsequent searches, displayed in the Find result panel, does NOT work at all !

    To reproduce the issue :

    Download the bug.txt file of @mario-valle :

    https://github.com/notepad-plus-plus/notepad-plus-plus/files/5378450/bug.txt

    Open this file with Notepad++

    First, deletes the end of the long line 4, which begins with Nelle nostre «Case dei Bambini», in order that the line contains exactly 1,002 characters ( not included line-break chars ! ). Personally, I ended this line with «bambini indipendenti» che 89012 to correctly see from the 998th to the 1,002th final character !

    Run a first search of the word indumenti, clicking on the Find All in Current Document

    Run a second search of the word spolverare, clicking again on the Find All in Current Document

    Run a third search of the word indumenti, always clicking on the Find All in Current Document

    In the Find result panel, right-click on the context menu and choose the Uncollapse All option

    You can easily verify that a double-click at any part of these 3 lines, correctly, selects the right word, in the bug.txt file

    Note that the two words spolverare and indumenti occur only once, in line 4 of @mario-valle’s file !

    Then add just ONE character to the line 4 : I chose the digit 3 so the line ends with «bambini indipendenti» che 890123. Now, the line is 1,003 chars long, OK ! Redo all the process :

    First, clear the Find Result panel, using the Clear All option, from the context menu

    Run a first search of the word indumenti, clicking on the Find All in Current Document

    Run a second search of the word spolverare, clicking again on the Find All in Current Document

    Run a third search of the word indumenti, always clicking on the Find All in Current Document

    In the Find result panel, right-click on the context menu and choose the option Uncollapse All

    Now, double-click on each line of the Find result panel. It’s obvious that a double-click on the line, relative to the 1st search processed, works correctly. However, a double-click on the two other lines, relative to the 2nd and 3rd searches, produce nothing !?

    Of course, I’m going to refer to this post in the GitHub issues 9009 and 8525 !

    Best Regards,

    guy038

  • Need help for regular expression - find, insert and delete

    11
    0 Votes
    11 Posts
    3k Views
    Alan KilbornA

    @Venus642 said in Need help for regular expression - find, insert and delete:

    Alan … your solutions is better

    Well, I certainly wasn’t trying to “win”. :-)
    I often try to point out that a solution to such a problem doesn’t have to be all crammed into one operation.
    It can make the operation harder to understand for a novice with regular expressions.

  • 0 Votes
    3 Posts
    3k Views
    Reena DR

    Wow…
    Worked Perfectly…

    Thank you Verymuch…