• FORUM: Posting Queue

    Pinned
    10
    12 Votes
    10 Posts
    8k Views
    Ivy_PearsonI

    Thanks for the update, Peter. Totally understand the need for a posting queue—spam is getting tricky these days. Hopefully, it won’t take long to get posts approved once you earn reputation!

  • Please Read This Before Posting

    Pinned Locked
    1
    4 Votes
    1 Posts
    9k Views
    No one has replied
  • np++ and USB moving to another PC

    3
    0 Votes
    3 Posts
    55 Views
    PeterJonesP

    @cashfields ,

    Your post would have been much easier to read if you actually typed your text in the post, rather than typing your text in the image.

    It looks like what you would like is the ability to have the file history be set to “relative” instead of “absolute”. Unfortunately, the developer already rejected a feature request which requested that you be able to store a session (File > Save/Load Session… commands) automatically as relative. And if sessions were too complicated to do that for, in his mind, then doing it for the file history is definitely right out.

    However, if you save a session, and then edit it to be relative, I believe it works … so you could then load the relative session anytime your USB changes drive letter, and it would hopefully work for you.

    (I know it’s not exactly what you’re asking for, but given his rejection of that feature request, it’s the best you’re going to get.)

    Or, for a poor-man’s session: make a batch file that opens each file relatively in the batch file.

  • Redact Selection feature

    1
    0 Votes
    1 Posts
    49 Views
    No one has replied
  • 0 Votes
    2 Posts
    64 Views
    PeterJonesP

    @pasha-19 said in styler.xml/WordsStyle/keywordClass association with langs.xml/Language/Keyword/Name:

    I was looking to add a WordsStyle with a keyword list to an existing language.

    That’s not the way it works. Existing languages are hardcoded (compiled) internally with a list of available styleIDs, and only particular styleIDs have keyword lists associated with them. You cannot just add a WordsStyle with its own styleID and a list of keywords, and hope that the lexer will magically see them. It will not.

    My question concerns the styler.xml/WordsStyle/keywordClass that appears to match langs.xml/Language/Keyword/Name. There are some seemingly standard keywordClass values instre1, instre2 and type1 to type7 and maybe type8. Do these seemingly standard values have any additional meaning besides providing a link from the keywordClass in styler.xml to the Language/Keyword/Name in langs.xml?

    They have an integer value (0-8). Those correspond to the 9 available keyword lists inside the lexer, which any given lexer may reference zero or more of.

    If you use the wrong keywordClass, Notepad++ will not be able to pass the list of words to the lexer. And if you make up a keywordClass or use one that’s not already defined for a given language, the lexer won’t see it, and those keywords won’t get highlighted.

    [can] any keywordClass/Name that matches could be used?

    Nope, sorry. Each lexer has a predefined list that Notepad++ will pass on to the lexer and that the lexer will recognize.

    To sum up: the official list of available keywordClass/name values for any given lexer are listed in the copy of langs.model.xml that ships with a given version of Notepad++: that will always list all the ones that Notepad++ knows about, and if you try to define others than those for any given language, Notepad++ cannot pass it on to the lexer.

    However, it may be that your langs.xml or stylers.xml are out of date. If you haven’t updated to v8.9.1 yet, run that update, and the first time you run, Notepad++ will update langs.xml and stylers.xml (or any other active theme) to include any missing styles. You might find that the language you want to customize has more keyword lists available in the Style Configurator now.

    If a given language doesn’t have enough different styles to give you differently-colored sets of keywords, you cannot just trick Notepad++ into creating more for you. However, using the EnhanceAnyLexer plugin (you can install it using Plugins Admin from the Plugins menu), you could define a regular expression to match the keywords you wanted. For example, for a given lexer language, if you wanted to add three keywords with red foreground and four with a blue foreground, you could use the following in the EnhanceAnyLexer configuration file (whcih you can easily access using Plugins > EnhanceAnyLexer > Enhance current language.

    [LexerName] 0x0000FF = \b(red1|red2|red3)\b 0xFF0000 = \b(blueA|blueB|blueC|BlueD)\b

    This will give:
    ad688e24-5716-46a9-beae-934a6017df82-image.png

    The EnhanceAnyLexerConfig.ini has documentation in its comments, explaining that it’s 0xBBGGRR for the hex colors, and how to get those colors to only apply within certain parent styles, etc. And https://github.com/Ekopalypse/EnhanceAnyLexer/ is the homepage for the plugin.

  • Highlight color not correct

    3
    0 Votes
    3 Posts
    66 Views
    David Smith 2D

    @Alan-Kilborn
    Current line background colour is now white, also tried minty green
    Selected text is now the minty green
    Multi-selected text color is also minty green

    minty green for all 3 then Current line background colour white.

    green-white.jpg

  • Why is the forum so scary?

    3
    -1 Votes
    3 Posts
    68 Views
    PeterJonesP

    @Mister-Smitt said in Why is the forum so scary?:

    I chose the dark style. I create a new theme and some simply incredibly disgusting additional black and white window appears in the form of some kind of cutout from the main one, which does not even move.
    Who is your stylist?

    The forum’s themes and skins come from the authors of NodeBB. If you don’t like the free themes that they make available to this Notepad++ community for free, that’s really your problem. You don’t need to be a jerk about it.

  • How to show 2 document list windows in vertical?

    3
    0 Votes
    3 Posts
    97 Views
    W TXW

    @FreeMeow Thank you!

  • How can you copy or move 2 or more files at once into any folder?

    16
    0 Votes
    16 Posts
    4k Views
    Hugo84-ChitownH

    @Coises This is an excellent solution. Not only did it solve this specific issue for me (as I transition away from my job, and need to save out many learning notes), but this taught me new tricks that I didn’t know Notepad++ was capable of. Thank you so much for sharing your knowledge.

  • Admin mode changes

    2
    0 Votes
    2 Posts
    343 Views
    PeterJonesP

    @Xan-Kun ,

    Yes, Notepad++ drastically improved the behavior when trying to save admin-only files in v8.8.6 in October.

    Specifically, in older versions (v8.8.5 and earlier), when it would make you restart Notepad++, there are two conditions:

    If you had left the option to save the session snapshot with periodic “backup” enabled, then your changes would be preserved in the periodic “backup”, and when it restarted as Admin (after Windows OS does a UAC prompt, unless you have UAC prompting off), then it would be able to save them. And then you’d accidentally leave it running as Admin, and could accidentally ovewrite any file you wanted, and might mess up your settings. So, a great situation to be in. But if you had disabled the periodic backup, like many do (see our backup FAQ for reasons why), then when Notepad++ asked if you wanted to restart, you would have to Ctrl+A Ctrl+C to copy all the changes before asking the question it’s currently prompting you for, then then restart Notepad++ (*: and not prompt you about unsaved changes; so if you didn’t do the copy-all already, you just lost minutes or hours of changes; wheee!!!), then see that the file is back to the original (because it couldn’t be saved), and then have to paste in your changes (hoping you hadn’t accidentally hit Ctrl+C on anything in the meantime, losing your file changes), and then do the save. And then you would need to remember to exit Notepad++ and manually restart it (because Notepad++ doesn’t have a “restart in normal mode” button or menu entry when you’re running as Admin) to go back to normal editing.

    And, in v8.8.6 and newer: You would edit a file. When you go to hit save, Notepad++ asks Windows OS for permission to write to the protected file. If you have UAC enabled, then Windows OS will do the UAC prompt to let you know it’s writing to a protected file, and then do it; if you have UAC disabled, then Windows checks if your user is allowed to elevate without asking, and if it does, it automatically elevates and allows Notepad++ to save. But either way, after that save, Notepad++ is back to the normal permissions, and there is no chance you will forget to switch out of Admin mode and/or get your config files messed up. So much better situation.

    Re-enabling the Windows OS UAC prompts (that you disabled at some point) would get you the level of “don’t accidentally save this Admin file” protection you want, without ruining the improvement for everyone who runs without periodic backup or doesn’t want to risk corrupting their config files and doesn’t want to ruin dragging a file from Windows Explorer into Notepad++ because Notepad++ was accidentally left in Admin mode. (It’s also best practice for Windows security. If you are running with your main user who can be elevated without Windows doing a UAC prompt, then as soon as any malware gets on your system, even if it’s only running as your “normal” user, it can access every file on your drive by just telling Windows “but I’m user Xan-Kun, so of course I’ll play nice”. So you are opening yourself to a huge security risk by running without Windows UAC prompts.)

    The change was intentional. The change makes the software better. As a fellow user of Notepad++, I don’t see a good reason to go back to pre-8.8.6 behavior.

  • How to change the colors used for html/css that is exported

    2
    0 Votes
    2 Posts
    87 Views
    David Smith 2D

    This issue has been fixed:
    I did the following. As I use a inline style sheet I created a “css color.css” file in Notepad++. Just a blank page that I can do the following:

    I can now paste my HTMLPad 2025 css code into Notepad++ with the colors I changed under Settings> Style Configurator.

    I also created a “html-colors.html” blank file and I can copy the html code with colors that Notepad++ provides that has been updated in the Style Configurator.

    Next I highlight the text then go to “Plugins” on the toolbar then “NppExport” then “Copy all formats to clipboard”.

    I can now paste in the html/css code into Word with the colors I want.

    I still cannot create a style in Word 2024 with colors as I suspect it would be too complicated for Word to figure what parts the different text it should color.

  • Session migration

    2
    0 Votes
    2 Posts
    76 Views
    PeterJonesP

    @Magic-Mugs ,

    Assuming all your open files are real files, and all in the exact same folders on old and new machine, then just copy over %AppData%\Notepad++\session.xml

    If some of your files are the unsaved new # tabs, you will also need to copy over everything in %AppData%\Notepad++\backup\

    But if you want all the same settings from your old to your new, just copy over everything from %AppData%\Notepad++\

  • Strange highlighting in PHP files

    3
    0 Votes
    3 Posts
    178 Views
    Nazar HotsaN

    Thank you! Problem solved.

  • Name on donation button is not "Don Ho" -- is this okay?

    2
    1 Votes
    2 Posts
    265 Views
    shane knappS

    @David-Brown i came here to let you know that my receipt had what appears to be his email address on it (which i’ve blocked out here for privacy):

    2a1a9747-0e42-4d15-80d0-eb4737ffabd4-image.png

    seems legit to me, but i can’t know for sure. :)

  • 0 Votes
    8 Posts
    371 Views
    S

    @PeterJones

    Hello,

    Here is a demonstration of what altsnap does

    You can press the ALT key, or the “hot click” which on my mouse is mouse button #5.

    And this allows moving and resizing a window from anywhere.

    https://youtu.be/Wzt7hSyGGmc

    It is very ergonomic as you don’t have to position the cursor on the thin window edges.

    I think this is quite rare and cutting edge practice, most people I think just maximize their window and use one application at a time.

    But I have a very large desktop of 4x 40 inch 4K monitors and I needed more efficient way to move the windows around.

    As for the scrolling, there are two “middle-click” based scrolling methods I know about. There’s the autoscroll round thing which I don’t really like, it’s like using a thumbstick. It’s good if you want to let it scoll at a constant speed like the text scroll at the beginning of star wars but it is otherwise clumsy and slow to use, not “dextrous”.

    I prefer the “scroll anywhere” method which is similar to like you would scroll a touch tablet interface.

    I demonstrate both of these modes here

    https://youtube.com/shorts/yHuWI4f1rOg

    So, what I am asking is like scroll anywhere but in a left-right direction to move the center divider around.

  • 4k resolution

    4
    0 Votes
    4 Posts
    2k Views
    J

    @Maxitrol-Mat said in 4k resolution:

    While some things look good, some other things look microscopic.

    One thing that may help: In Preferences > Toolbar, try choosing a “large” UI option.

  • 0 Votes
    1 Posts
    137 Views
    No one has replied
  • Pascal multi line string highlight

    4
    0 Votes
    4 Posts
    778 Views
    EkopalypseE

    @ViniwDOrazio

    Yes, when working with multi-line matches enclosed by the same pre- and suffix, you should try to match something unique before the prefix.
    If the number of lines is fixed, you could also adjust the offset configuration parameter accordingly.

  • The problem with notepad.runMenuCommand

    10
    1 Votes
    10 Posts
    644 Views
    W

    @PeterJones said in The problem with notepad.runMenuCommand:

    Simple and light is often the opposite of universal.

    This is often the case, but not always.

    @PeterJones said in The problem with notepad.runMenuCommand:

    If you solution is “universal enough” for you, fine;

    Of course, when there is no ideal option, you have to choose the one that is most suitable for the situation.

    @Alan-Kilborn said in The problem with notepad.runMenuCommand:

    Good luck achieving all of those all of the time.
    Or do you have a “pick any 2” or “pick any 3” type rule? ;-)

    Thanks. It happens to everyone at some point ;)
    But it must be universal and fast, even if it means making the code complex.

  • Search Dialog Adding `\r\n` to pasted search queries.

    3
    0 Votes
    3 Posts
    173 Views
    H

    @PeterJones Thanks so much for the quick reply. Installing the release candidate fixed the issue for me. Much appreciated!