• 0 Votes
    5 Posts
    382 Views
    Alan KilbornA

    @C-Bacca said in How do I sort strings separated by commas?:

    is there a way to make this a series of steps, like a macro,

    Yes, you should be able to record it and save it as a macro.
    Note that Step 1 would not be part of the macro, but would be something that you have to do before running the macro.
    For more on macros see HERE.

  • 1 Votes
    9 Posts
    1k Views
    mkupperM

    @PeterJones said in Is the shortcut mapper dialog box broken?:

    Could you download the appropriate artifact for your installed Notepad++, and see if this build fixes it for you?

    I’m now using both the MSVC.x64.Release and MSVC.Win32.Release Notepad++.exe files. The shortcut mapper issue has been fixed. Thank you @PeterJones

  • How do I add a macro to toolbar

    General Discussion
    8
    0 Votes
    8 Posts
    635 Views
    Leszek HelakL

    @PeterJones
    Thanks, I understand

  • 0 Votes
    4 Posts
    310 Views
  • Spotted in a drive-by on the web

    Humour
    2
    5 Votes
    2 Posts
    751 Views
    M

    @Terry-R
    Year 99999 Shouldn’t be a problem… Around 2025 years ago we manage to alter all code references to “Year = Year -1” to “Year = Year + 1” without much difficulty.

  • need help to look for a word

    Help wanted · · · – – – · · ·
    10
    0 Votes
    10 Posts
    837 Views
    PeterJonesP

    @dr-ramaanand said in need help to look for a word:

    simply because it is easier

    That’s apparently a matter of opinion. To me, negative lookbehind, where it’s telling you “look behind the current position, and make sure it’s not XYZ” is a lot easier to read/understand than “match something, then say, wait no, I don’t actually want to match that, let’s fail this whole path and move on to the alternation”. (And, from what I can tell, that’s not really a good explanation of skip+fail, because it takes our regex guru pages of text to explain it, whereas I can successfully convey the meaning of a negative lookbehind in one sentence.)

    Since your first version of the skip+fail post was wrong, and you couldn’t tell this immediately, even after it was pointed out to you that it was wrong, I am not convinced that it’s truly as “simple” – even for you – as you are implying.

    I am going to stick with recommending solutions that i could explain if necessary; I will only personally link to the skip+fail formula if I know of no other way to do something (and I wouldn’t tell anyone it’s “simple”)

    But if it truly makes more sense to you than a negative lookbehind, that’s great for you; everyone is different.

  • 0 Votes
    2 Posts
    216 Views
    PeterJonesP

    @Code-with-Pritam ,

    Notepad++ is a text editor. You type your C++ code in there, and the syntax highlighting in Notepad++ will make it easier to visually parse the code you are typing. Then you use an external compiler to compile your source code, then you run the executable. In a bog-standard approach, all Notepad++ is used for is typing.

    If you have a plugin like the NppExec plugin, you can help automate some of the steps. For example, I have written a script for NppExec plugin that I call gcc-CompileAndRun, which saves the active file, runs gcc on that file to create an executable with the same name, then runs the executable in the NppExec console window:

    NPP_SAVE cd "$(CURRENT_DIRECTORY)" gcc -o "$(NAME_PART)" "$(FILE_NAME)" $(NAME_PART)

    (This script only works on a self-contained, single-file c program. if you used g++ instead of gcc, it would work on a self-contained, single-file c++ program. You could have a similar script which runs your own copy of make – or similar, as appropriate to what C++ compiler and build system you have: the Notepad++ source code, when you are building it with mingw-based g++, uses mingw32-make; strawberryperl comes with a mingw-based gcc/g++ compiler setup, uses gmake (which might be just a rebranded mingw32-make, but I’m not sure); and I know I’ve heard that some c++ setups on Windows can use CMake – but, anyway, if you have a makefile with your project, you could easily do a similar NppExec script that would run the right flavor of make with an appropriate target, rather than directly compiling one c/c++ file and running its executable.

    (Personally, I stick with NppExec for the single-file programs, but for anything more complex, I’m more likely to just do the code editing in Notepad++ and then go to a Windows command-line-prompt to run makefiles and the like. And for C++ apps built with the VisualStudio ecosystem, I have given in and started to use that full IDE environment, because debugging is more convenient that way.)

    This forum actually has a FAQ entry on how to Compile using an external compiler from Notepad++, which reiterates some of what I told you above, and also has a bit more on the specifics of the NppExec plugin.

    This forum is not really the best resource for learning C++, because C++ is just one of the 90+ languages that Notepad++ knows how to syntax highlight, and this forum is focused on the Notepad++ aspects, not on the specific coding language you want to use or programming tasks you want to accomplish. There are tons of websites out there dedicated to helping you learn C++; and there are other forums (like stackexchange) that are better suited to getting answers to coding questions, so you’ll get better answers to coding questions someplace like that than you will here.

    So, if you have specific questions about the use of Notepad++ and its plugins that the FAQ and my brief introduction to using NppExec for compiling C++ code didn’t cover, feel free to ask, because questions specific to Notpead++ is the reason this Forum exists and most of the regulars come to answer questions.

  • 0 Votes
    8 Posts
    500 Views
    Alan KilbornA

    @Game-Movies:

    This is indeed what your data looks like:

    <strong>$1</strong>!

    Your search screen capture shows that you are using Regular expression search mode. This isn’t going to allow you to match the $ as that is a special character.

    You’d want:

    <strong>\$1</strong>!

    But if you remove that, wouldn’t you also want to remove the line (now empty) that it is on as well? And what about the <p> and </p> lines that wrap it?

    I get the sense that you are just kind of hacking at this, and are likely to end up with a mess in the end.

  • 2 Votes
    10 Posts
    11k Views
    PeterJonesP
    Update

    As of Notepad++ v8.7.6 in January 2025, the Shortcut Mapper should now list the keys based on the keyboard layout that was active when you started Notepad++. You should no longer need this FAQ, unless you are choosing to use an older version of Notepad++.

  • 0 Votes
    2 Posts
    243 Views
    PeterJonesP

    @GuFengEn0d ,

    Where can I find shortcut keys for special characters?

    Do you mean: “how do I type those characters in my file?” You use your keyboard. If your keyboard doesn’t have those, you would enter the characters the same way you would in any text eidtor or normal typing application on your computer.

    Do you mean: “how do I use those characters for keyboard shortcuts?” You use Settings > Shortcut Mapper, double click on the command whose shortcut you want to change, and pick the “special character” from the drop-down list – note that a character on its own cannot be a shortcut; you need to use a modifier (like Ctrl or Alt) along with it. Please note:
    - In v8.7.6 or newer, the keys specific to your keyboard should be listed in the Shortcut Mapper’s character pulldown
    - In v8.7.5-and-earlier, the mapper only shows the US-EN keys, and you might need to read this FAQ for how to map ~ [ ] ; ' \ / <> and Num . (numeric keypad .) to what keys they actually are on your keyboard: it gives some example mappings for a handfull of keyboards, and shows you a website where you cand

    Do you mean: “how do i search through the Shortcut Mapper to see whether those keys are used in any existing shortcuts?” Use the Filter: ____ field on each page of the Shorcut Mapper.

    See the User Manual’s Shortcut Mapper section for more.

  • Notepad++ v8.8 Release Candidate

    Announcements
    13
    11 Votes
    13 Posts
    2k Views
    donhoD

    @schnurlos

    https://notepad-plus-plus.org/news/v88-we-are-with-ukraine/ gives an Error 404 (link within “F1” Info).

    It’s because v8.8 is still in RC state.
    It will be on line in few hours.

  • 4 Votes
    5 Posts
    684 Views
    Alan KilbornA

    I was feeling deja vu as I was reading this blog, and the feeling was not misplaced.
    These verbs were discussed previously as part of the more generic discussion here FAQ: Regex “Backtracking Control Verbs”; follow the link and the use the “find” function of your browser to jump to the text _______________ (*SKIP)(*FAIL) _______________.

  • 0 Votes
    43 Posts
    5k Views
    dr ramaanandD

    @guy038 Oui, merci beaucoup!

  • 0 Votes
    6 Posts
    445 Views
    guy038G

    Hi, @fern99, @terry-r, @mkupper and All,

    An other example :

    To list all files which do NOT contain the strings ABC AND JKL AND XYZ, in upper case, from your opened documents, use :

    FIND (?s-i)(?=\A.*(?:ABC|JKL|XYZ))(*SKIP)(*F)|\A.

    Check the Wrap around option

    Click on the Find All in All Opened Documents button

    REMARK : Do keep the LAST regex dot ( . ), after \A. If omitted, consecutive searches of this regex does *NOT give the same results ! ( Bug ? )

    BR

    guy038

  • 0 Votes
    6 Posts
    401 Views
    mpheathM

    @byzod

    This issue mentions about the unfolding that can happen with numerous lexers.

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

    I posted a LuaScript script in a comment in that thread that trades the behavior for another behavior by changing the editor.AutomaticFold setting temporarily in the 2nd script. Certain characters will set the automatic folding off which changes the header fold lines to become invisible sections and back again once continue editing. It is not a solution but rather a swap of side-effects to help to keep the current fold state.

    I have little knowledge of AutoHotkey syntax and it’s UDL issues so at the moment cannot offer an updated LuaScript script for calling editor.AutomaticFold.

    The objective-c lexer seems unaffected with /* multi-line comments and not sure why yet compared to looking at the lexers source code. Obviously the styling continues on past the folding though why it does not open the folds seems like possibly the folding is delayed in some lexers and so like the LuaScript script does is to cause a delay though that is just a theory at the moment.

  • 5 Votes
    4 Posts
    679 Views
  • 1 Votes
    3 Posts
    249 Views
    Ben HardyB

    @PeterJones yes that was it!
    So indeed it was an easy one - you’d think I would have figured that out. Haha
    Thank you for pointing me to the setting!

  • Kotlin Language

    Notepad++ & Plugin Development
    3
    0 Votes
    3 Posts
    3k Views
    Ako SajaiaA

    plzz add koltin guys , i love notepad ++ everything i’m writing in it , pluzz doit :3

  • 1 Votes
    3 Posts
    243 Views
    John BlueJ

    @PeterJones, thank you so much!

  • 0 Votes
    3 Posts
    245 Views
    PeterJonesP

    @Annie-Chuang ,

    In addition to @Alan-Kilborn’s request, you can also go to ?-menu’s Debug Info, and paste that here.

    Please also tell us the full path of the filename where you put the XML file – was it c:\users\___\AppData\Roaming\Notepad++\functionList\XyzPdq.xml or c:\Program Files\Notepad++\functionList\XyzPdq.xml or somewhere else?

    I referred to many documents

    Unfortunately, you don’t tell us which ones, so we cannot know whether they were telling you the right thing, or not.

    Here are some reasonable documents to consult:

    User Manual: Function List = https://npp-user-manual.org/docs/function-list/#how-to-customize-function-list User Manual: Function List Config Files = https://npp-user-manual.org/docs/config-files/#function-list Including instructions on how to upgrade from a v7.9-or-earlier FunctionList (from before November 2020) to one that works with modern Notepad++ = https://npp-user-manual.org/docs/config-files/#upgrading-old-function-list-entries Community Forum FAQ: Function List Basics = https://community.notepad-plus-plus.org/topic/19480/faq-function-list-basics

    re-created the XML file and put it into FunctionList Folder

    As per the User Manual, there are two files that need to be edited to add the FunctionList – you need to have the XML specific to your language, and you need to edit the functionList\overrideMap.xml – if you didn’t do the latter, then just creating the XML isn’t enough.

    Also, you have to make sure it’s named correctly, and that you’ve got your User Defined Language (UDL) already set up and working, too.