• Replace backslash and new line

    17
    0 Votes
    17 Posts
    4k Views
    Darren BrownD

    @Alan-Kilborn Will do, thanks :-)

  • How Do I "Shortcut" Using Back Button to Recover Deleted Text?

    4
    0 Votes
    4 Posts
    5k Views
    Troglo37T

    I’m done, it worked! I was able to retrieve the ton of entries that were deleted! Thanks again!

    P.S. I don’t drink coffee LOL! I would probably never go to sleep!

  • SessionManagerPlugin: Save sessions together with their files?

    2
    0 Votes
    2 Posts
    1k Views
    PeterJonesP

    @Kardo-Rostam ,

    Sorry, I’m not a SessionManager plugin user… but I downloaded a copy in a portable NPP and played around a bit. I do not think that SessionManager has the feature you describe . I can think of two good reasons why it wouldn’t, off the top of my head:

    a session often contains more than one file, and those files can come from a variety of locations – even across different drives / filesystems – so where is “with the file it’s connected with” be?

    from a practical standpoint, do you want the SessionManager Plugin to have to search your whole hard drive for every time it wants to populate the list of available sessions?

    It has to build that list from somewhere; when it only has to look in the single directory defined in Plugins > Session Manager > Settings, it’s really easy to build the list of sessions. If it didn’t have that, it would have to scan your whole computer to try to find all the sessions. I guess in theory, the plugin source code could be re-written so it has a master list of session files in one known location, but that the individual files can be stored anywhere; then, as long as you never moved those session files with Windows Explorer or other outside tools, it could work. Unfortunately, per the plugin’s official homepage, the original author has stopped development on the plugin; chcg made a 64 bit release a few years later, but it’s been 3 years since even that one was updated.

    Alternative: Notepad++'s builtin Sessions feature has the default session.xml stored in %AppData%\notepad++\ … but it has the File menu’s Save Session and Load Session – and that kind of session can be stored anywhere, as long as you know where the session file is. With that feature, you could store the session file with the file(s) it opens.

  • Notepad++ python , remove the path from the text file

    3
    0 Votes
    3 Posts
    258 Views
    Valdisnei SouzaV

    Perfect, it works. This is to replace strings in my sourcepawn template.

    import time import os Filename = notepad.getCurrentFilename() FilenameEnd = Filename.rsplit(os.sep, 1)[-1] timeStr = time.strftime( '%I:%M %p' + ' - ' + '%d-%m-%Y' ) editor.rereplace(r"TM_FILEDATE", ( timeStr )) editor.rereplace(r"TM_FILENAME", ( FilenameEnd ))

    Thanks!!

  • another replacement request for help

    40
    1 Votes
    40 Posts
    3k Views
    Carlos J. Segnini R.C

    Hello friends
    So one year later I had to do the same replacements, and found that the original script did not work anymore (Same error as reported by @guy038 ). Something must have changed in Notepad++, Python or somewhere else, because the first time it worked fine.

    Anyway, I updated the code as suggested by @Alan-Kilborn and it worked correctly.
    Cheers everyone

  • Line break before every UPPERCASE word

    4
    0 Votes
    4 Posts
    373 Views
    guy038G

    Hello @floyddebarber, @peterjones and All,

    An alternative solution would be :

    SEARCH (?-i)(?<=\.)\h*(?=\u\u)

    REPLACE \r\n

    So, for instance, from this INPUT text :

    MÜLLER 6 - Blahblah. SMITH 5 - Asdds. Asdsd.DI CARLO 8,5 - And. Maybe even. Multiple. Sentences here.

    you would get the OUTPUT text :

    MÜLLER 6 - Blahblah. SMITH 5 - Asdds. Asdsd. DI CARLO 8,5 - And. Maybe even. Multiple. Sentences here.

    Notes :

    This regex searches a range of horizontal blank chars ( \x20, \x09 or \x85 ), possibly null, but ONLY IF :

    It is preceded with a literal full period due to the positive look-behind (?<=\.)

    It is followed with two upper-case letters, accentuated or not, due to the positive look-around (?=\u\u)

    And, in replacement, this range is just replaced by a Windows line-break ( \r\n ) ( Use \n only if working on Unix files )

    Best Regards,

    guy038

  • Not having the same session depending on how I open notepad++

    5
    0 Votes
    5 Posts
    239 Views
    Terry RT

    @Ailothaen said in Not having the same session depending on how I open notepad++:

    It looks I have two different installations on my PC:

    The second “installation” running from the D: drive is very likely a “portable” version. This is not actually installed, rather just unzipped into any folder of choice. You might want to consider leaving it, although “upgrading” it to a later portable version might be preferable as quite a few enhancements and bug fixes since the 7.6 version.

    Often the seasoned forum members will have multiple versions installed. Reasons are:

    Identifying whether a recent enhancement introduced a bug Helping out a poster with their issue, this means not changing an already highly customised installed version just for a test Being able to separately customise the second version for different tasking possibly many other reasons as well

    If you do consider keeping an installed version AND the portable version then code the shortcuts with additional text so you know which version you are using. Also look at having different visual settings such as colourisation of text, font differences, etc.

    Terry

  • How do I get the icons to have colors again?

    2
    0 Votes
    2 Posts
    883 Views
    PeterJonesP

    @david-union

    Settings > Preferences > General > Toolbar = Standard Icons: small

    https://npp-user-manual.org/docs/preferences/#general

  • Regex: How can I split lines from text at every 31 words

    8
    0 Votes
    8 Posts
    1k Views
    Neculai I. FantanaruN

    @PeterJones said in Regex: How can I split lines from text at every 31 words:

    [\w’’]+\W+

    THANKS. super, so I update my answer:

    FIND: ([\w'’"]+\W+){31}
    REPLACE BY: $0\r\n

    OR

    FIND: ([\w'’"]+\W+){31}\K
    REPLACE BY: \r\n

  • Dark Mode - Search dialog

    3
    0 Votes
    3 Posts
    167 Views
    PeterJonesP

    unless the checkbox to the right of Find Next is confusing you.

    The checkbox to the right of Find Next is the “2 find buttons mode” – you can see that by hovering over the right checkbox, as shown in the screenshot below (the speech bubble is seen when you hover over the checkbox with your mouse). The checkbox to the left of “In Selection” is the “In Selection” checkbox (pointed to by the red arrow I added to my screenshot).
    dead3443-ba68-4234-a296-f783a4c4b502-image.png

  • Looking for ways to add highlighting(Style occurrence of...)

    6
    0 Votes
    6 Posts
    530 Views
    Alan KilbornA

    @Marc-Grossman said in Looking for ways to add highlighting(Style occurrence of...):

    “Double marking” text patterns with “Purple” then “Yellow” creates “Red”
    As a result, I had Six colors even if there were only five selections provided by the application.

    Ah, yes, that can be done.
    And you could create a macro so that it could be done in a single step.
    Here’s a thread that, in its more-recent posts, tells you a lot about colors, maybe it has some relevant information for you:
    https://community.notepad-plus-plus.org/topic/18157/how-to-set-find-background-colour

  • Compatibility with Windows 10 on utf-8 support

    3
    0 Votes
    3 Posts
    409 Views
    oberon168O

    @PeterJones Thanks, the Style Config fixed the issue

  • 0 Votes
    3 Posts
    371 Views
    Alan KilbornA

    I agree with @Terry-R that it is working fine in 8.1.4

  • Semicolons lost in Notepad++ after editing in Excel

    8
    0 Votes
    8 Posts
    787 Views
    Mihai IlieM

    Thank you all for your answers!

  • Fluent toolbar and Plug in toolbars

    4
    0 Votes
    4 Posts
    634 Views
    Lucio Menci 0L

    It doesn’t run well. Thoose images are token without change the toolbar but only the layout:
    Standard Toolbar:
    76af908f-7499-4a0c-8c1c-99f0d8c5301f-image.png
    Fluent UI:
    95b23123-0cda-4489-8267-c5d1837a133e-image.png
    There are 5 left icons, The next 8 are shown on lefter buttons, and 5 buttons hava casual icons.

    The buttons are in the same position, only the icon is wrong (you can see it by the tooltip).

    Thank you
    Lucio

  • Only manual highlighting?

    7
    0 Votes
    7 Posts
    379 Views
    Michael D. DoubetM

    The uninstall without saving custom settings and then reinstall seems to have worked. My normal selecting highlighting appears to be back.

    Thanks for the help.

  • Running a code through notepad++

    2
    0 Votes
    2 Posts
    176 Views
    Terry RT

    @Nathan-Walser said in Running a code through notepad++:

    If I click the run button in notepad

    Have you tried View, View Current File in, and then select one of the browsers?

    Terry

  • Restore closed window?

    4
    0 Votes
    4 Posts
    3k Views
    sepodeleS

    I found a bunch of files in backup folder so I was gonna try opening those. But now when I reopened N++ (after I had closed instance-B as well), everything from instance-A returned (!). So I guess I hadn’t done anything in session-B after I closed session-A. I exited session-B via File - Exit but apparently that didn’t overwrite session.xml. Phew. Installing AutoSave now. Thanks for the help! :)

  • How can I pull up data written between seperators (|||) ?

    3
    0 Votes
    3 Posts
    173 Views
    PeterJonesP

    @AliciaKeller ,

    Isn’t that big long section also “between separators”? How so you tell the difference?

    What do you want done after it’s matched? Run it all together? Put it on separate lines, one line for each field? Put it between new separators? Something else?

    ----

    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 literal text using the </> toolbar button or manual Markdown syntax. To make regex in red (and so they keep their special characters like *), use backticks, like `^.*?blah.*?\z`. 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.

  • How format srt file error

    4
    0 Votes
    4 Posts
    318 Views
    astrosofistaA

    @JS-Developer

    Glad the provided regex worked for you. If you frequently run into this kind of issues, I would suggest you to read the regex guide in the FAQ section of this forum and start learning how to develop your own solutions. It could be hard but rewarding.