• 0 Votes
    12 Posts
    3k Views
    CletosC

    THAT sounds simplest for your situation @Cletos , but that’s just my 2c.

    Yes, that is very great, thank you!

    Here’s what I do (note: this is way too advanced for @Cletos), note that I always run portable:

    Yes, extreemly too advanced. Sounds like a quite big effort.

  • add auto-complete support for Google Apps Script TypeScript projects

    4
    0 Votes
    4 Posts
    2k Views
    EkopalypseE

    @imthenachoman

    npp knows only the concept of having statically defined completions lists.
    If you want such functionality you need to find out if the language
    in question offers some tools which can be used by npp to introspect your object.

  • *_js.php as javascript style

    6
    0 Votes
    6 Posts
    647 Views
    Jesus CamposJ

    Hi, thanks for the script. It opened a new world to me :)

    I Changed the enumerator [NOTIFICATION.FILESAVED] to [NOTIFICATION.FILEOPENED] and It worked but with a problem: if I do not have any opened file it work well, if I have, it change the language to the first opened file… So, I just added notepad.activateFile(filename) before the menu command and it work ok :)

    Thanks!

  • Migration: How to preserve serial length

    2
    0 Votes
    2 Posts
    282 Views
    PeterJonesP

    @R-van-Wingerden said:

    Is there a option in Notepad++ to preserve

    I’m not sure what you’re trying to preserve, or what you think Notepad++ didn’t preserve for you.

    If you only changed https://oldname to https://newname, then nothing else should have changed. However, if your oldname or newname were not literally those, but included regex characters, and you had enabled regular expression search/replace mode, then that might explain things.

    But so far, I don’t see that you’ve given us enough information.

    -----

    Please Read

    FYI:

    This forum is formatted using Markdown, with a help link buried on the little grey ? in the COMPOSE window/pane when writing your post. For more about how to use Markdown in this forum, please see @Scott-Sumner’s post in the “how to markdown code on this forum” topic, and my updates near the end. It is very important that you use these formatting tips – using single backtick marks around small snippets, and using code-quoting for pasting multiple lines from your example data files – because otherwise, the forum will change normal quotes ("") to curly “smart” quotes (“”), will change hyphens to dashes, will sometimes hide asterisks (or if your text is c:\folder\*.txt, it will show up as c:\folder*.txt, missing the backslash). If you want to clearly communicate your text data to us, you need to properly format it. That topic also explains how to embed images by uploading them to a public server like imgur.com, and embedding them using the syntax ![](http://i.imgur.com/QTHZysa.png)

    If you have further search-and-replace (“matching”, “marking”, “bookmarking”, regular expression, “regex”) needs, study this FAQ and the documentation it points to. Before asking a new regex question, understand that for future requests, many of us will expect you to show what data you have (exactly), what data you want (exactly), what regex you already tried (to show that you’re showing effort), why you thought that regex would work (to prove it wasn’t just something randomly typed), and what data you’re getting with an explanation of why that result is wrong. When you show that effort, you’ll see us bend over backward to get things working for you. If you need help formatting, see the paragraph above.

    Please note that for all regex and related queries, it is best if you are explicit about what needs to match, and what shouldn’t match, and have multiple examples of both in your example dataset. Often, what shouldn’t match helps define the regular expression as much or more than what should match.

  • File Backup Failed

    5
    0 Votes
    5 Posts
    985 Views
    Alan KilbornA

    @paulteigeler

    …or can fix it

    I think it falls in the feature request arena; it’s not something that is technically broken.

  • v7.7.1: Syntax highlighting & coloring is only "partial" working

    3
    1 Votes
    3 Posts
    1k Views
    The Ghost RiderT

    Thank you so much - I´ve overseen the double quotes on fact of serious eye problem. :-(

    Now everything works fine and it looks good!

  • We need to talkt about the "modified file" bug

    2
    -3 Votes
    2 Posts
    372 Views
    gstaviG

    Notepad++ offers you a few modes for File Status auto-detection:

    Disabled. Enabled. Which is what you describe. Enabled and update silently. Which is my default.

    For every mode some user can come with some flavor of your “hey” comments:
    Disabled - “hey I just checked out my latest git repo and then overwrote by mistake 5 files with old versions”.
    Enabled - “hey, see your example above”.
    Update silently - “hey I just checked out my latest git repo and lost 4 hours work for unsaved file”.
    Your proposed notify on tab switch mode = “hey I checked out my latest git repo and 2 hours later I still get a modified warning when I switch between my 500 open tabs”.

    All of these comments are correct in the right context. And all of them are also wrong. Notepad++ gives plenty of choices and a user has a responsibility for his choices.

    Forgive me for quoting myself from another ticket: Try to be a little less egocentric and realize that Notepad++ needs to balance different requirements of thousands of usage patterns.

    So we don’t need to talk about the non-bug you describe. But you may politely offer a well thought improvement to Notepad++. But also expect some push back from other users with different use cases.

  • MAC encoding in cyrillic Windows

    3
    0 Votes
    3 Posts
    775 Views
    Сергей ЗеленовскийС

    Thank, works. So, for my example, the mozilla chardet library does not work correctly.

  • Java Class Comment Remove

    2
    0 Votes
    2 Posts
    650 Views
    rinku singhR

    find what : ^.*\*/
    replace with : empty
    search mode : regular expression

    menu item > edit > blank operation > trim leading space
    (https://youtu.be/qjnzZi9UhN8)

  • Need a "Compare" plugin (one I used has stopped working.)

    9
    1 Votes
    9 Posts
    2k Views
    Michel MerlinM

    Have you tried winmerge.org ? More convenient and probably more efficient than NPPP plugin(s).
    Versailles, Sat 31 Aug 2019 16:14:40 +0200

  • Ctrl-S to save doesn't work for brand new files

    3
    2 Votes
    3 Posts
    4k Views
    Michel MerlinM

    Notepad++ only saves the file if its content has changed
    “Ed Kolis” ~20 aug « for some reason Ctrl-S is disabled until I enter some text! »
    I discovered the same problem a few years ago, reported it, and was replied (from memory):
    « This is normal, NP++ does NOT touch the file following your Ctrl+S if the contents has NOT been changed»
    I ranted (politely, NOT like here where I prefer to be clear than diplomatic) that this was NOT the expected standard Windows behavior, and that anything unexpected is misleading the user and compromising his efficiency and safety.
    Yet after years I finally found that the Notepad++ behavior is actually better than the standard one and could be followed by Windows, which would benefit everybody. Provided it is clearly explained, which I try here:

    The 1st line in the Notepad++ interface is the Menu line The 2nd line is the icon line In that 2nd line, 2nd position, you have the “Save” icon (a floppy disc); in 3rd position, “Save All” (a pile of 3 smaller floppies) At start, both icons are gray. In this state, if you order a “Save” (either by clicking the “Save” icon or by Ctrl+S or else), oppositely to standard Windows, this does NOT save the file. As soon as you change something in the file that has the focus, both icons turn light blue; then if you order a Save, it gets done, and both icons turn back to gray.

    After long use I highly appreciate this; I see immediately and clearly if all the open files (a hundred in my current case) are saved; if just one has been changed (by me, or by a batch program I did, or else), then I get immediately notified by the “Save All” icon that turns blue. Also, if you instinctively save a file to make sure you don’t lose anything, and you at once regret because you wanted to change the file Date ONLY after checking if the contents had changed, with regular Windows it’s too late, but with NPPP you are covered by just checking the file Date.
    I finally find that, especially with numerous files, the Notepad++ behavior is easier to manage and safer for the files.
    Versailles, Fri 30 Aug 2019 20:13:05 +0200, edited (list formatting) 20:14:45

  • Update dialog on the wrong monitor

    2
    0 Votes
    2 Posts
    282 Views
    EkopalypseE

    @Joseph-Steel

    agreed, but I assume you need to follow this.

  • bat file opening in MS notepad, now to open in npp?

    2
    0 Votes
    2 Posts
    482 Views
    PeterJonesP

    If you have the Edit with Notepad++ entry applied to all file types, it shows up whether or not the program has an “association” with Notepad++. That’s the safer way to do that.

    Go see https://notepad-plus-plus.org/community/topic/18140/how-to-get-windows-explorer-right-click-menu-open-edit-with-notepad for a very recent discussion started on how to get that entry. (ie, it was the post I answered just before reading yours.)

  • Can you copy the file caches from portable to installer

    2
    0 Votes
    2 Posts
    399 Views
    PeterJonesP

    @Rex-Parthi said:

    Is there anything can be added or exits to read the portable to the installer?

    By this, I assume you want some automated way for the installer to guess in which of the effectively-infinite possibility of path names you had your portable version, and automatically copy those open-but-unsaved files over to the installed instance.

    As you might be able to tell from my phrasing, that’s just not going to happen. It’s something you can do much easier than the installer – since you know where your portable version is; you know whether you’ve got open-but-not-saved files, and you know which are important and which don’t need to be copied.

    have a known portable version (for sake of this example, it’s in c:\portable-notepad++\ install a permanent version (for sake of this example, it’s in c:\program files\notepad++\ and your config files are in %AppData%\Notepad++) copy everything in c:\portable-notepad++\backup\ to %AppData%\Notepad++\backup\ copy the session file: c:\portable-notepad++\session.xml to %AppData%\Notepad++\session.xml when you open your permanent installed version, it should have all the unsaved-but-open files available.

    Or, better

    in the portable version, save all those files to a known location with known names in the portable version, File > Save Session…, and put the session file in a known location in the installed version, File > Load Session…, and browse to that session file Continue good file-saving and file-backup practices, not expecting unsaved files to survive without effort on your part, because you know that the safety of your critical data is up to you. (“Save early, save often”)

    Good luck.

  • Log startup of notepad

    3
    0 Votes
    3 Posts
    4k Views
    Παύλος ΓκέσοςΠ

    Seems that SysInternals Process Explorer does the trick.
    This is thread’s call stack:
    Clearly the DSpellCheck is the evil. I disable it and there is no hangs until now.

    ntoskrnl.exe!KiCpuId+0xaa
    ntoskrnl.exe!ExAcquireSpinLockExclusiveAtDpcLevel+0x2c2
    ntoskrnl.exe!KeWaitForSingleObject+0x1a3
    ntoskrnl.exe!ExReleaseResourceForThreadLite+0x60
    ntoskrnl.exe!KeInsertQueueApc+0x725
    ntoskrnl.exe!ExAcquireSpinLockExclusiveAtDpcLevel+0x4cd
    ntoskrnl.exe!KeWaitForMultipleObjects+0x272
    win32k.sys!memset+0x7c97
    win32k.sys!memset+0x7d59
    win32k.sys!EngFntCacheLookUp+0x1747b
    win32k.sys!memset+0x6c9e
    win32k.sys!EngFntCacheLookUp+0x60b0
    win32k.sys!W32pArgumentTable+0x3818a
    win32k.sys!EngSetLastError+0x7f
    win32k.sys!EngSetLastError+0xd836
    ntoskrnl.exe!longjmp+0x5b93
    USER32.dll!IsDialogMessageW+0x20a
    USER32.dll!UserHandleGrantAccess+0x4020
    DSpellCheck.dll!isUnicode+0x55ed2
    DSpellCheck.dll!isUnicode+0x3bae
    DSpellCheck.dll!isUnicode+0x35cb1
    DSpellCheck.dll+0x4a1d
    DSpellCheck.dll!beNotified+0x98
    Notepad++.exe+0xd7fe6
    Notepad++.exe+0xd7ede
    Notepad++.exe+0x8e94a
    Notepad++.exe+0x12fc4e
    Notepad++.exe+0x13e35f
    kernel32.dll!BaseThreadInitThunk+0xd
    ntdll.dll!RtlUserThreadStart+0x1d

  • 2 Votes
    9 Posts
    6k Views
    PeterJonesP

    @dinkumoil said:

    Session file ext. and define a file type. The image below shows that I’ve choosed nppssn.

    Cool, I didn’t know that’s what those preference fields were for. I’ve added that tidbit to my TODO list for the preferences documentation update.

    One benefit of my method vs yours (or of combining our two methods: using the same extension in both registry and Session file ext) – mine allows adding the -multiInst flag, so that if you’re normally in single-instance mode, but want to open multiple sessions simultaneously in separate instances, it will not work with always-single-instance mode. Oh, that’s what “open session in a new instance” is for. More clarifications to make in docs.

    Looks like I have enough TODOs in that file that I should be making a preferences-documentation pull request as soon as I have time. :-)

  • Environment variables in settings network share

    4
    0 Votes
    4 Posts
    4k Views
    Alan KilbornA

    @ThiloL

    Our advice on that is to start here.

  • Where to report Regex bug?

    2
    0 Votes
    2 Posts
    4k Views
    Alan KilbornA

    @David-Caylor said:

    Sorry if this is the wrong area

    It is. The official bug reporting area may be found via this link: https://notepad-plus-plus.org/community/topic/15741/faq-desk-feature-request-or-bug-report

    But of course it is ok to discuss suspected bugs here first.

    I think you might be a victim of a “catastrophic” regular expression situation.

    Try this, which may (or may not) be equivalent to the Replace All operation you’ve described, but for purposes of illustration it might be valid: Without changing anything else about your setup, change to the Mark tab of the Find window, then press Mark All. Notice that all of your text will be marked with a red background (indicating what matched), including ANNUAL_SALARY, which sanity says your regular expression should not match.

    Now have a look here: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4761 and do some reading…

    What it comes down to is that you should write a better regular expression to match your data. Perhaps \d+\R as a suggestion for your Replace All operation. Maybe I would do something different from that, but I don’t know what you are really trying to accomplish; I think your example is just that, an example, and your real task is hidden from us – that’s okay, not a problem.

    BTW, your regular expression is inefficient and/or “odd” in other ways. Would it surprise you to know that it will match the zero-length positions between every character in ANNUAL_SALARY? We offer some learning advice about regular expressions here: https://notepad-plus-plus.org/community/topic/15765/faq-desk-where-to-find-regex-documentation

  • 0 Votes
    2 Posts
    4k Views
    EkopalypseE

    @Prahlad-Makwana4145

    by comparing the dll with the official ones.
    Note, it is not reliable to compare SciLexer.dlls from different Npp versions.

  • Set style of LF/CR and similar characters?

    10
    0 Votes
    10 Posts
    4k Views
    Alan KilbornA

    @Maury-Markowitz said:

    so what is the option?

    All I meant was that you only spoke of the View All Characters option. I wasn’t sure if you noticed the other choice that doesn’t get you the “heavy” line-endings, specificially View Whitespace and TAB.

    if you need to look for a space followed by a line-ending, I’d suggest a search rather than visual inspection:

    Bring up the Find window (ctrl+f).
    Find what box: \x20\R
    Search mode: Regular expression
    Press the Find All in Current Document button.