• Search with two strings in line

    6
    0 Votes
    6 Posts
    24k Views
    Taiwo topeT

    @Peter-Reichmuth please, exactly which one of the solutions work *perfectly

  • Search results unchanged after a change.

    10
    0 Votes
    10 Posts
    673 Views
    gstaviG

    @Alan-Kilborn said in Search results unchanged after a change.:

    I think (can’t check right now) that when Visual Studio’s editor does a replace-in-files, it populates its find-output window with all of the replacements made – this sounds similar to what OP here is describing?

    Reply

    Don’t use Visual Studio much, but as I said Visual Studio Code search & replace is extremely advanced and dynamic.
    When you type a search string it is updating the search results in real-time, highlighting the search string.
    When you type a replace string it dynamically overstrike the original “search” string in the results, highlighted in RED and present after it the “replace” string in green. All of this before actually commiting to the search and replace.

    Extremely cool. Impressive work of engineering. However, the benefit over Notepad++ primitive search and replace is limited.
    Admittedly, search and replace is error prone so the ability to see the results BEFORE helps boosting your confidence. However, that is not what was asked by @Alan-Wynne

    So my claims are:

    Doing anything similar to VSCode is a complete rewrite. Doing simple post search has questionable value. Doing it automatically could annoy lots of users.

    An undo feature for search and replace in files would be nice.

  • 1 Votes
    3 Posts
    290 Views
    Alan KilbornA

    Lots of NUL characters…probably the hex dump is going to be the best you can get.

  • Local active Variables

    6
    0 Votes
    6 Posts
    589 Views
    PeterJonesP

    @Alan-Wynne said in Local active Variables:

    it does require npp to be running with admin priviladges though…

    I use NppExec daily to do similar tasks (in fact, many of the posts that mention gcc and NppExec in the same post in this Forum are my equivalent of the script you just posted), but I have never had to have Admin privileges to save or run an NppExec script.

    (Though, admittedly, you might need admin privileges to install the plugin – but once you’ve installed it, you can restart Notepad++ without privileges, and the plugin works.)

    But under normal usage, what you described should not require admin privileges. Possible exceptions I can think of include: 1) if the file you are compiling is protected, or (2) the directory it’s in is protected; or, (3) if it was because it wouldn’t let you save the NppExec script, then your %AppData%\Notepad++\Plugins\config\npes_saved.txt might have weird permissions.

  • Wrap symbol color

    3
    0 Votes
    3 Posts
    384 Views
    joecarJ

    @Alan-Kilborn Thanks!!

  • Can't save a xbrl file

    3
    0 Votes
    3 Posts
    262 Views
    Theo ST

    @PeterJones Ok, Thanks for your answer.

  • Missing ... menu in forum

    7
    0 Votes
    7 Posts
    349 Views
    CoisesC

    @PeterJones said in Missing ... menu in forum:

    @Coises ,

    Chat and the ⋮triple-dot menus are working for me again. How about for you?

    It looks normal from here. Thanks!

  • Slow start when put on Google Drive (stream mode)

    6
    0 Votes
    6 Posts
    498 Views
    Javier CasaresJ

    Seems like OneDrive works differently as it’s much faster. I will switch to it then.

  • Hibernation Wakeup: UNC File Removed

    9
    0 Votes
    9 Posts
    1k Views
    xomxX

    @Laurie-Stearn said in Hibernation Wakeup: UNC File Removed:

    triggers a clean boot out of the S4 state, which necessitates the relaunching of N++

    With this info, I already have an idea of ​​what might be going on. The clean boot means that all the N++ process data, previously saved by the hibernation process to the Windows file “C:\hiberfil.sys”, is thrown away. So no previously opened files/tabs buffers in N++ available, N++ will start from the scratch with opening its files according to its session.xml file. Unfortunately N++ is updating its session.xml file content only at its regular exit (I was once considering the session.xml update after every successful file opening, but that was rejected for good reasons), not continuously right when a file is opened. So then the N++, after its re-launch, does not have the actual info needed for the opening of all your previous N++ files…

    @Laurie-Stearn said in Hibernation Wakeup: UNC File Removed:

    Even in this scenario, all local files are still loaded with the relaunch

    It will depend on the previous state of your session.xml file. Simple test - if every time you finish work and are about to hibernate, you first exit the N++ and then re-launch it before the Windows hibernation itself - I bet that the session.xml will contain the complete information about your session files and there will not be your described issue…

    You can also use the N++ menu > File > Save Session… to always have a fresh backup for your session.

    @mkupper said in Hibernation Wakeup: UNC File Removed:

    nppLogNetworkDriveIssue.xml

    That logging trigger is intended for something else (detection of the last write timestamps for network files), it will not help us here.

  • "Find Next Word from Caret" or "Select and Find Next"

    12
    0 Votes
    12 Posts
    976 Views
    donhoD

    @mkupper said in "Find Next Word from Caret" or "Select and Find Next":

    Sometimes a creepy person sits near you, edges closer and closer, and whispers, do you want to touch my caret?
    That seems to explain Notepad++'s search functions. It does not matter if the creep is to your left or right.

    You just made my night :D

    https://twitter.com/Notepad_plus/status/1832921210239225984

  • New feature or missing option or workaround

    3
    1 Votes
    3 Posts
    359 Views
    again great maggaraA

    @PeterJones

    You are right.

    In my use case it would be recent changed files related or not to each other. They are not changed outside Notepad++. They are something that I am focused to do, currently working or maybe some hours later. Something that I am engaged.

    “so if the Green Checkmark is normal and Yellow Pencil is changed-without-saved”

    I could imagine something like a flash shape.

  • 0 Votes
    5 Posts
    461 Views
    Colin HinsonC

    Thank you Coises, that’s what I needed.
    Colin.

  • Hash error on Customize Toolbar plugin

    11
    1 Votes
    11 Posts
    1k Views
    Alan KilbornA

    @Cooly0 said in Hash error on Customize Toolbar plugin:

    For x32, I never understood why/if anyone used x32 anymore

    I suppose one reasonable reason would be if they had a plugin that they needed that was older and it only had a 32-bit build.

  • File/tab specific word wrap (vs. global enable) -- THREAD REBOOT

    6
    2 Votes
    6 Posts
    1k Views
    Alan KilbornA

    This thread is older; newer threads about scripts refer one to this site’s FAQ entry, which contains info on running a script from startup.

    But, really, I could have been more explicit about what you needed to do to get it to activate upon startup, when I posted the persistent version of the script – sorry about not doing that.

    I don’t see the instructions about adding the lines to startup in the original instructions above

    For the record, the instructions were in the source code for the script itself, down near the end of the file.

  • Find and change EOL's

    3
    0 Votes
    3 Posts
    317 Views
    __

    @PeterJones Very Thanks.

  • How do I turn folding OFF?

    5
    0 Votes
    5 Posts
    611 Views
    mkupperM

    @SteveRMann You likely will also want to disable the keyboard shortcuts related to folding so that you can’t accidentally fumble-finger-fold something. They still work when the folding thing is no longer visible in the left margin. You will see a horizontal line that marks the folded area.

    In the shortcut mapper you filter for the word fold and will see a bunch of shortcuts in the Main menu tab in the section for the View menu.

  • Feature request: Resizable UDL window

    2
    1 Votes
    2 Posts
    362 Views
    PeterJonesP

    @Sam-Marrocco ,

    That’s a great idea – whether it’s a tooltip or resizable. Unfortunately, we fellow Notepad++ users in the Community don’t get to make decisions about such things. I suggest following our Feature Request FAQ to make the feature request in a place where the developer will see it and could make a decision about it. (As the FAQ says, make sure you search the existing issues – both still-open and already-closed – to make sure no one else has requested that – and upvote it if it already exists)

  • How to keep paragraph reduced

    3
    1 Votes
    3 Posts
    306 Views
    Raphaël AldhariR

    @Alan-Kilborn

    Thank you, I didn’t know the session part, it will be useful !

    Have a good day

  • Suggestion: make inc files not default associated with any language

    2
    0 Votes
    2 Posts
    510 Views
    PeterJonesP

    @Sykledust said in Suggestion: make inc files not default associated with any language:

    in order to allow automatic syntax highlighting one have to edit “%AppData%\Notepad++\langs.xml”, and (in my experience) this has to be re-done for every NP++ update.

    In the Settings > Style Configurator, you can literally just go into the language you do want it to be, go to the User ext.: box and add it – no editing of langs.xml needed. Here’s a screenshot of adding it to the C language: e27f3429-368c-456b-a82f-59255f616620-image.png

    Once you’ve hit Save & Close from the Style Configurator, then the next time you open an *.inc file in Notepad++, it will be under the new language, not Pascal, because user-extensions take priority over the default list from langs.xml. This change, like other user-defined changes, does stay chosen if you do a normal update of Notepad++, because Notepad++ updates (under normal circumstances) do not overwrite the user-edited config files.

    this has to be re-done for every NP++ update.

    Even if you did it in langs.xml, this is incorrect: a normal upgrade does not delete or overwrite %AppData%\Notepad++\langs.xml or other such files – so unless you deleted that file (or the whole %AppData%\Notepad++\ folder), or something else weird was going on, it would keep that choice.

    (Obviously, installing on a new computer will require making the config change again, but this is true for every option in Notepad++.)

  • How to read every line in a file edit box

    2
    0 Votes
    2 Posts
    334 Views
    CoisesC

    @heraldww said in How to read every line in a file edit box:

    How to read every line in a file edit box

    Notepad++ can open many files at once.
    Now I want to traverse every line of each opened file.
    What function do I need to call?
    I don’t want to read files directly from the hard drive.
    I need to read them from the memory interface through an API
    What function should be called?

    I assume you’re talking about writing a plugin or a script. I can give you a clue regarding plugins; the script logic should be similar, but I don’t know the details.

    To get the contents of an active tab, use SCI_GETTEXT or SCI_GETLINE, along with other functions you’ll find described nearby in the same document to get the length of the text or the number of lines.

    Notepad++ keeps one or two views open, with a Scintilla control in each view and the document of the active tab in that view loaded into the Scintilla control; the documents in the other tabs are not loaded into Scintilla controls, and to the best of my knowledge there is no way to read their contents without loading them into a Scintilla control.

    You can switch active tabs, though, and thereby traverse all open files. I don’t have an example handy, but the information you need is in this Notepad++ documentation.

    NPPM_GETNBOPENFILES will tell you how many files are open in each view, and NPPM_ACTIVATEDOC will activate a specific document, so that should get you most of the way there.