• About attributes of the language node, in langs.xml

    4
    1 Votes
    4 Posts
    248 Views
    PeterJonesP

    @guy038, said in About attributes of the language node, in langs.xml:

    Regarding the Lua language, the first line is :
    I hope that it still works with this layout. Personally, I would expect this syntax :
    … For the two languages mssql and sql, the commentLine attribute is moved at end of current line, after the commentStart and commentEnd attributes

    Order of attributes is irrelevant to XML (even when parsed by the outdated tinyxml library used in N++)

    The embedded Javascript and SearchResult languages do not have any extension ! I suppose that it’s on purpose ?

    Since embedded Javascript is only for JavaScript embedded in HTML and similar files, it makes sense to not populate the ext attribute. And SearchResult even more so.

    More generally, for a specific attribute, is the attribute="" syntax identical to the total absence of this attribute ?

    As far as I know or can determine.

    Regarding the backspaceUnindent attribute, it doesn’t seem used, by default, even for the two languages python and yaml which use the four space indentation

    Don didn’t bother updating the XML to include the default value for all languages, because the code already assumes the default value.

    That attribute will only show up on languages that you change the state of that option – or perhaps on languages where you change any of the langs.xml-related options in the GUI (I haven’t tested that).

    Thus, the no status, for the powershell language seems useless, too !

    If you toggle it on and then back off (there might have to be an exit/reload between; again, I haven’t tested specifically), it will first populate the attribute with the yes when you toggle it on (and then save settings), then it will populate with no when you toggle it back off (and then save settings).

    Once Notepad++ has started tracking a given attribute in its XML settings, it will always write that value when it writes the associated XML on exit; the attribute-is-missing case is just to simplify handling installations that are being upgraded (so a person doesn’t have to re-create their langs.xml in order to be able to toggle that option), and Don made use of this to save the effort of adding that attribute to every language in the model XML file.

    … however, looking at the langs.model.xml file, for the powershell language, I just see :

    So, this may be a mistake on my part, although I don’t use the powershell language, yet !

    Right now, the most recent commit for langs.model.xml is here, and it shows that powershell does not include that attribute. Which means for the no value to have shown up in your XML, you either toggled that option or you made some other change for powershell (knowingly or unknowingly).

  • pinned tabs

    7
    0 Votes
    7 Posts
    336 Views
    Lycan ThropeL

    @datatraveller1 ,
    @Alan-Kilborn is right, if what you’re describing is true, although even after enabling the “Exit on Close the last tab” in the preferences dialog, I couldn’t reproduce your issue, so unless you didn’t enable the pin tab feature, and then click the pin, I don’t see how this could have happened. I tried several different variants of it, and couldn’t do it.

    Even though I agree with you on trying to see the value of this feature, other than to keep a document pinned and to the left, and unable to be moved once it’s pinned, I see no other value of it for me. If people want it for some reason, good for them, it’s implemented, and fortunately, you also have the option to disable it, so…the OP’s statement to me, seems to exemplify excessive conditions.

    I seldom have so many files open that they scroll off the screen, and frankly I find that kind of tab/file poor management and chaotic in nature. Between the File->Recent Files and the View->Document List features, I don’t see the purpose of having excessive amounts of files open at one time. Even assuming one has a header file open, and multiple dependent files open to look at, this seems like bad management, to me.

    Even with web development, I would expect more open applications for graphics, FTP, word processor, etc, outside of Notepad++, than mutiple files of .css files, .html files, maybe scripts, etc inside of Notepad++ that wouldn’t be better off being managed (open/closed as needed) by using the Recent Files or Document List features or even the Project Panel or Folder As Workspace views to help manage a set of files in a project. I know some people work differently than perhaps I would, but it seems that excessive amounts of open files would lead to nothing more than confusion, accidental closures (which Pin Tab helps with) or editing the wrong file…etc. Might be just me though. :-)

  • Plugin 'AutoCodepage v1.2.7' für 'notepad++ v8.7.4' funktioniert nicht

    5
    0 Votes
    5 Posts
    214 Views
    datatraveller1D

    @PeterJones said in Plugin 'AutoCodepage v1.2.7' für 'notepad++ v8.7.4' funktioniert nicht:

    Sorry

    No problem, no need to say Sorry :-)

  • Per-Desktop Instance

    8
    0 Votes
    8 Posts
    4k Views
    Mark OlsonM

    @KoliadaES-Release said in Per-Desktop Instance:

    Mostly because the last 5 or so updates seem to be massaging existing material. But it is quite possible I’m missing something important.

    What you’re missing (IMO) is that Notepad++ has very few automated tests, so new features have an increased risk of causing regressions in weird unpredictable ways. This is very suboptimal, but nobody has the time or motivation to add more automated tests, especially since UI tests would probably be very difficult to implement.

  • Keep only one copy of a line that may repeated many times, or only once.

    2
    0 Votes
    2 Posts
    150 Views
    CoisesC

    @Robert-Or-Janet-Diebel said in Keep only one copy of a line that may repeated many times, or only once.:

    I wish to search a file and keep only one copy of a line that may be repeated many times, or only once. The output, then is one copy of every line type, with all repetition removed.

    Edit | Line Operations | Remove Duplicate Lines does that.

  • CRTL+Z & CTRL+Y

    4
    0 Votes
    4 Posts
    222 Views
    CoisesC

    Going by the translation Terry R posted, this is the same behavior discussed recently here:

    https://community.notepad-plus-plus.org/topic/26403/

    and, as noted in that thread, there is a GitHub issue here:

    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15878

    addressing it.

    Honestly, I think this is very unlikely to change, and I think it would be very difficult to “fix” in a consistent way. But, see the GitHub discussion and add to it, if you have observations or suggestions.

  • Windows taskbar; filename only?

    3
    0 Votes
    3 Posts
    160 Views
    Harly WalshH

    @PeterJones I just found it…
    I don’t skim too fast…
    Cheers anyway mate.

  • Grab Mobile Phone Number from wrap data

    3
    0 Votes
    3 Posts
    720 Views
    guy038G

    Hello, @tcast-mobile, @mark-olson and All,

    @tcast-mobile, just a variant which does not care about the socmed string but simply searches for the nearest multi-digits phone number, preceded by a + sign, beginning a line :

    FIND (?-is)healthcare\R(.+)\R(?:.+\R)+?\+(\d+\R)

    REPLACE $1 | $2

    Notes :

    Most of the explanations, relative to the regex syntax, have already been given by Mark. Two other points :

    The (?:......) syntax is a non-capturing group, as we do not need this information in replacement

    The \+ represents a literal +

    Best Regards,

    guy038

  • How to Markdown code on this forum?

    Locked
    12
    1 Votes
    12 Posts
    29k Views
    PeterJonesP
    For Future Readers

    The hints in this discussion are mostly still good (other than suggesting imgur, as the moderator note clarifies); however, a few years after this discussion, we added a FAQ: Formatting Forum Posts which should be used as the canonical/official guide for using Markdown on this Forum; the benefit of the FAQ is that it can and will be kept up-to-date, which is harder to do for these older discussions.

  • The Notepad++ website is blocked in Russia.

    4
    0 Votes
    4 Posts
    3k Views
  • Hidden shortcut ctrl+} ?

    3
    0 Votes
    3 Posts
    223 Views
    Y

    @Coises Oh, I see, shift+] = }
    Now it works.
    Much appreciated!

  • after upgrade, I lost most tabs

    3
    0 Votes
    3 Posts
    182 Views
    Y

    @PeterJones Thanks for your help. I’ll try.

  • Coding of it

    3
    0 Votes
    3 Posts
    174 Views
    Alan KilbornA

    @Mark-Olson

    What? A picture of Mark now?
    I am in no way surprised. :-)

  • Auto Update Notification upon closing NPP

    3
    0 Votes
    3 Posts
    190 Views
    PeterJonesP

    @Alan-Kilborn said in Auto Update Notification upon closing NPP:

    But don’t bother making such a request; it’s been requested before, and is still an open item.

    Even worse, it’s been requested multiple times – recently in #15369, and earlier in #8457, and earlier in #3755.

    And in the two earlier issues, the statement from the developer when they were closed was that “the silent installation” option that now exists is the only way he’s willing to address the issue…

    But I don’t think those issues ever pointed out the specific issue that @morgantic pointed out: that if you are accustomed to opening the app and immediately typing, it will just absorb all that typing without doing anything useful (and hitting ENTER might even accidentally start the update process, when you really thought you were just typing a newline in text). However, the developer didn’t close the most-recent #15369 (yet), so maybe @morgantic could supply the additional information there, trying to lend credence to the argument that the “silent installation” mentioned in the closed issues is not a sufficient fix for all the problems that update-at-launch causes.

  • Insert sequential numbers at start of lines

    26
    0 Votes
    26 Posts
    7k Views
    deleeleeD

    @Alan-Kilborn said in Insert sequential numbers at start of lines:

    This version handles all types of selections.

    Perfect!!! Thank you so much 😁👍

  • Pinned Tabs: Now and Future

    34
    2 Votes
    34 Posts
    4k Views
  • 0 Votes
    2 Posts
    363 Views
    Mark OlsonM

    @Freya-Smith
    Probably not. There is at least one plugin (XMLTools) that can format XML (and thus HTML), but that plugin does not understand CSS or JavaScript. There is also JSTool, a plugin that can format JavaScript, but it doesn’t understand HTML or CSS.

    So the best workflow I can think of to reformat HTML and JavaScript would be something like:

    Use XMLTools to reformat the HTML Use the regular expression (?s-i)<script[^<>]*>\K(?:(?!(?:<\w+|</script>)).)* to find script tag, and for each script tag: Copy the selected text into a new tab Use JSTool to reformat the text in that tab (this will make the JavaScript pretty Select the reformatted JavaScript Paste it back over the selected script tag

    Sadly JSTool is not smart enough to reformat selected text while ignoring text that isn’t selected, and given that the maintainer seems relatively uninterested in the plugin nowadays, I doubt that feature will ever be implemented. Thus, it doesn’t seem like there’s any way to efficiently reformat JavaScript+HTML in Notepad++, and that’s before even considering the CSS.

    To be honest, I don’t think Notepad++ is the best text editor for working with JavaScript/HTML/CSS in 2024 on Windows; I would probably use VSCode for a project in those languages, and save Notepad++ for working with things like CSV’s, log files, or JSON.

  • POLL: Remove 'Show close button on each tab' option

    30
    0 Votes
    30 Posts
    2k Views
    ErolB1E

    @Alan-Kilborn
    I’m running 8.7 (32 bit), and what I see is that all tabs have an always-visible close button that becomes active on hover (changing color) and that can be clicked to close the tab. That’s something I want to keep in future versions.

    I don’t recall this being different in 7.8.2, but I could be misremembering.

    Edit: I do have “show close button on each tab” checked.

  • Why doesn’t the notepad++ I use have the following menus?

    2
    0 Votes
    2 Posts
    144 Views
    PeterJonesP

    @Freya-Smith said in Why doesn’t the notepad++ I use have the following menus?:

    Why doesn’t the notepad++ I use have the following menus?

    That exact version has that option available for me:

    bd852d81-662f-45b6-b563-b51ce4f989d3-image.png

    (This was a fresh portable unzip, with no changes, showing the default is unchecked, but if you want the option on, checkmark it)

  • Help Needed with COMPARE plugin..thanks in advance

    14
    0 Votes
    14 Posts
    1k Views
    pnedevP

    @ray-Landolfi said in Help Needed with COMPARE plugin..thanks in advance:

    I tried to select all and copy the lines but it copies every line not just the compared lines so its back to individually marking them…

    Check this description (I quote myself from the corresponding issue in ComparePlus repository):

    After a compare you switch to the file which differences you want to copy, open the ComparePlus menu and use one of the new Bookmark… commands depending on what type of diffs you want to copy (for example Bookmark All Diffs in Current View). This will add a Notepad++ bookmark on every diff line matching that criteria. Next you can use the Notepad++ functionality to copy all bookmarked lines (you will find it under Search -> Bookmark sub-menu).

    BR