• Make Notepad++ dark (not editor theme, but editor itself)

    32
    7 Votes
    32 Posts
    33k Views
    Greg TurnerG

    @ahmed-syed I signed in to this site just to say THANK YOU!!! I did not know about the post-it mode and am absolutely loving it.
    I knew about adding virtual desktops but it’s good to see somebody else giving them some love. Most people I’ve interacted with just think it’s gimmicky, but if you know how to utilize it correctly, it can be an invaluable multi-tasking tool.

  • Is there an easy way to organize all of my NPP tabs?

    6
    0 Votes
    6 Posts
    7k Views
    Jason CoxJ

    @angrygamer Perfect! Thanks

  • Balloon popup with button hint?

    10
    0 Votes
    10 Posts
    681 Views
    Alan KilbornA

    @massimo-mula said in Balloon popup with button hint?:

    I also got NPP Portable from PortableApps.com, which is v. 1.8.9 too

    Do not do anything with portableapps.com, as that is not a recognized or supported provider of Notepad++. The official portable version of Notepad++ is on Notepad++'s own web site.

  • lexing/styling with PythonScript

    10
    1 Votes
    10 Posts
    986 Views
    Alan KilbornA

    @guy038 said in lexing/styling with PythonScript:

    …and, if your Python script support the (?-s) notation…

    So just a note on that comment:

    There are a couple of ways to use regular expressions in a PythonScript.

    One way is by using the PythonScript-specific functions, e.g. editor.research(). When you use this function, you are operating on editor data only(!) and you are using a Boost-compatible regular expression.

    The other way is to use Python’s (e.g.) re.search() function. This time, you are using Python’s own regex engine and you are acting on data that you specify, i.e., it cannot be data from the editor, directly. It can, of course be data that is copied from the editor into a Python variable.

    The second means described above is what my demo script above is using. Since Python’s regex flavor doesn’t accept (?-s) syntax, it isn’t possible to use it.

    Of course, the script could be reworked somewhat, in order to use the first method of data access, above, and then (?-s) would be available.

  • Conflict between user defined languages

    6
    0 Votes
    6 Posts
    552 Views
    John KollarJ

    I found the following issues posted on GitHub that look like they’re related to this discussion thread:

    UDL syntax highlighting and folding regions are completely broken. #10007
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10007

    [UDL] “Force at beginning of line” for comments is buggy #9193
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9193

    Notepad++ User-Defined Language syntax coloring occasionally mess up in 64-bit version #5156
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5156

  • File Issue: cyrillic symbols in file displayed as '?'

    3
    0 Votes
    3 Posts
    482 Views
    artie-finkelsteinA

    @mike-carlove Any chance the menu selections in ‘the Encoding’ options have been changed?

  • print page number in footer

    3
    0 Votes
    3 Posts
    2k Views
    Alan KilbornA

    @jiri-cvrk

    Just an FYI: If you are looking to obtain “Page 3 of 7” I don’t think that is currently possible … the of 7 part.

  • Avoid reload popup when closing Notepad++

    6
    0 Votes
    6 Posts
    703 Views
    Francesco RombecchiF

    @neil-schipper Dear Neil,
    Hi Neil,
    I’ve tried turning off the automatic notification feature for changed files, I’ve also tried having it update without notification but it doesn’t do exactly what I want. Obviously my problem is just a nuisance, not a real error. If there is no solution, I will be fine with this walkaround.

    I’ll rewrite the situation that I’d like to see resolved:

    File Status Detection = enabled Update without notification = unchecked
    When I try to close a tab (or close Np++, or close all tabs) that has been updated by an external program Np++ asks me whether to reload the tab (and then closes it)
  • error in macros in Notepad++

    4
    1 Votes
    4 Posts
    953 Views
    EkopalypseE

    @heinz-berecz-0

    by installing the PythonScript plugin via PluginAdmin and using the notepad object with its menuCommand, runMenuCommand and runPluginCommand methods.
    Note that you can use the standard help function that Python normally has from within the PythonScript console window.
    For example: help(notepad.runMenuCommand)

  • 0 Votes
    13 Posts
    1k Views
    QiShQ 42Q

    @alan-kilborn 100% thanks , sorry i know that it is basic questions because i just started today but i had to ask here :), ok i will check it out

  • XML Pretty Print changes Empty Element tags

    2
    0 Votes
    2 Posts
    196 Views
    Stefan PendlS

    @tom-in-seattle
    This is general XML syntax, so you may talk to the plug-in developer on the plug-in development board or the development page of the plug-in you use.

  • search and replace a set of texts

    4
    0 Votes
    4 Posts
    478 Views
    guy038G

    Hi, @nagoor-meerasa-mohammed, and All,

    OK ! So, here is the road map :

    Copy all the File 1.txt contents in, let’s say, a file named File 3.txt

    Add a separation line of, at least, three = signs

    Append all the File 2.txt contents, after the separation line

    Open the Replace dialog ( Ctrl + F )

    SEARCH (?-s)\D\K(\d+):(?=(?s:.+^=+\R.*^\1\x20)(.+))|^===+(?s).+

    REPLACE ?1\2

    Tick the Wrap around option

    Select the Regular expression search mode

    Click only on the Replace All button ( Do not use the Replace button ! )

    Close the Replace dialog ( Esc )

    Save the File 3.txt modifications ( Ctrl + S )

    Here is an example where I copied your File 1.txt text, twice, then the separation line ===== and, finally your File 2.txt text

    3:1.428238e-001):4.577779e-002,64:9.743924e-002):7.427767e-002):2.922571e-002):3.206583e-002,((((4:7.719304e-002,5:7.767254e-002):9.925778e-002,92:1.697033e-001):2.906791e-002,(7:1.281314e-001,62:1.351362e-001):2.747034e-002):1.246730e-002,((6:9.872749e-002,7:7.750112e-002):3.270381e-002,(2:1.533366e-001,91:1.316264e-001):2.139538e-002):5.698094e-002):3.332409e-002):5.389512e-002,(2:2.990773e-001,((((((6:7.144297e-002,((5:3.452890e-002,1:7.746965e-003) 3:1.428238e-001):4.577779e-002,64:9.743924e-002):7.427767e-002):2.922571e-002):3.206583e-002,((((4:7.719304e-002,5:7.767254e-002):9.925778e-002,92:1.697033e-001):2.906791e-002,(7:1.281314e-001,62:1.351362e-001):2.747034e-002):1.246730e-002,((6:9.872749e-002,7:7.750112e-002):3.270381e-002,(2:1.533366e-001,91:1.316264e-001):2.139538e-002):5.698094e-002):3.332409e-002):5.389512e-002,(2:2.990773e-001,((((((6:7.144297e-002,((5:3.452890e-002,1:7.746965e-003) ===== 1 Phalera_flavescens 2 Ochrogaster_lunifer 3 Hyphantria_cunea 4 Eudocima_salaminia 5 Eudocima_phalonia 6 Grammodes_geometrica 7 Parallelia_stuposa

    AFter clicking on the Replace All button, you should get this new text :

    Hyphantria_cunea1.428238e-001):4.577779e-002,64:9.743924e-002):7.427767e-002):2.922571e-002):3.206583e-002,((((Eudocima_salaminia7.719304e-002,Eudocima_phalonia7.767254e-002):9.925778e-002,92:1.697033e-001):2.906791e-002,(Parallelia_stuposa1.281314e-001,62:1.351362e-001):2.747034e-002):1.246730e-002,((Grammodes_geometrica9.872749e-002,Parallelia_stuposa7.750112e-002):3.270381e-002,(Ochrogaster_lunifer1.533366e-001,91:1.316264e-001):2.139538e-002):5.698094e-002):3.332409e-002):5.389512e-002,(Ochrogaster_lunifer2.990773e-001,((((((Grammodes_geometrica7.144297e-002,((Eudocima_phalonia3.452890e-002,Phalera_flavescens7.746965e-003) Hyphantria_cunea1.428238e-001):4.577779e-002,64:9.743924e-002):7.427767e-002):2.922571e-002):3.206583e-002,((((Eudocima_salaminia7.719304e-002,Eudocima_phalonia7.767254e-002):9.925778e-002,92:1.697033e-001):2.906791e-002,(Parallelia_stuposa1.281314e-001,62:1.351362e-001):2.747034e-002):1.246730e-002,((Grammodes_geometrica9.872749e-002,Parallelia_stuposa7.750112e-002):3.270381e-002,(Ochrogaster_lunifer1.533366e-001,91:1.316264e-001):2.139538e-002):5.698094e-002):3.332409e-002):5.389512e-002,(Ochrogaster_lunifer2.990773e-001,((((((Grammodes_geometrica7.144297e-002,((Eudocima_phalonia3.452890e-002,Phalera_flavescens7.746965e-003)

    Notes :

    The File 2.txt list of items, at the end of File 3.txt, has been deleted, too !

    Of course, any number followed with a colon, which does not exist in the list, located after the separation line =====, is not replaced at all, in the section before the ===== line

    The File 2.txt list of items, at the end of File 3.txt, do not need to be sorted, too !

    Best Regards,

    guy038

  • Someone help me

    2
    0 Votes
    2 Posts
    225 Views
    guy038G

    Hello, @whalla-magla and All,

    If we assume that there is only 1 slash per line, then use the Regular expression search mode with :

    SEARCH (?-s)/..

    REPLACE /

    then your INPUT example :

    Clarck/22yaloo Black/36narkos Galim/balisok

    becomes :

    Clarck/yaloo Black/narkos Galim/lisok

    If you meant : delete the two digits after the / character, then use the following regex S/R :

    SEARCH /\d\d

    REPLACE /

    This time, your INPUT example :

    Clarck/22yaloo Black/36narkos Galim/balisok

    becomes :

    Clarck/yaloo Black/narkos Galim/balisok

    Best Regards

    guy038

  • 0 Votes
    2 Posts
    207 Views
    Alan KilbornA

    @amelie-viennot

    It is not possible to “select” text with a search, using Notepad++ as it ships.

    If you can say more about what you really want to do, give an example, maybe, perhaps some options may be given to you.

  • Having troubles rounding certain numbers on a line

    5
    0 Votes
    5 Posts
    517 Views
    Abdul AliA

    Thank you so much to both of you. Both solutions worked well and is going to save me so many hours. Do you guys have a paypal account, I would like to send you £10 each for your efforts. Thanks again

  • Terraform HCL syntax highlighting support

    14
    0 Votes
    14 Posts
    13k Views
    mmannionM

    I know this thread is old, but it’s come up as the top hit in web searches periodically over the past year, so I figured I’d post a reply here.

    I configured a user-defined language for HCL - at least a fledgling one - based on the documentation references that @PeterJones cites in the second post in this thread, as well as a cursory review of the HCL language spec. The relevant configuration is posted below, with the following caveats:

    I barely know HCL, this is my first Notepad++ UDL, and I’ve only spent about 2 hours on this so far, so set your expectations accordingly

    I’m posting this draft UDL in case it might help others get started, but…

    I’m not planning to maintain this as a project, so please don’t request fixes/enhancements

    I defined the new language using the Notepad++ 8.1.9.1 Language > User Defined Language > Define your language dialog

    Accordingly, the configuration below was persisted in my %APPDATA%\Notepad++\userDefineLang.xml file

    Another thread I read said that this is the old way of storing UDLs (the new way being the userDefinedLang directory) but the doc states that this is the method the configurator dialog uses, so voila

    I’m using dark mode with some global overrides, so you may need to change the colors just to make them readable if you’re using a light-colored background

    Two limits of which I’m aware are:

    Folding doesn’t work. This seems to be due to the fact that I’ve defined curly braces as the folding delimiter, but also as operators and in another delimiter (I can’t explain it better than that at the moment).

    Heredocs aren’t formatted specially, like you get with the built-in “shell” language, for example. I think that UDL just doesn’t support heredocs - but it’s equally likely that I just don’t know how to do it.

    You should be able to add the following to your userDefineLang.xml file (creating the file, if necessary) and restart Notepad++. Once you do, you should see a new “HCL” choice at the bottom of the Language menu (note that this won’t show up under the “H” sub-menu along with the built-in languages):

    npp_hcl.jpg

    Here’s the content of my userDefineLang.xml file:

    <?xml version="1.0" encoding="UTF-8" ?> <NotepadPlus> <UserLang name="HCL" ext="tf" udlVersion="2.1"> <Settings> <Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> </Settings> <KeywordLists> <Keywords name="Comments">00# 00// 01 02 03/* 04*/</Keywords> <Keywords name="Numbers, prefix1"></Keywords> <Keywords name="Numbers, prefix2"></Keywords> <Keywords name="Numbers, extras1"></Keywords> <Keywords name="Numbers, extras2"></Keywords> <Keywords name="Numbers, suffix1"></Keywords> <Keywords name="Numbers, suffix2"></Keywords> <Keywords name="Numbers, range"></Keywords> <Keywords name="Operators1">+ - * / % &amp;&amp; || ! == != &lt; &gt; &lt;= &gt;= : ? { } = =&gt; [ ] ( ) . , ... ${ %{ ~</Keywords> <Keywords name="Operators2"></Keywords> <Keywords name="Folders in code1, open">{</Keywords> <Keywords name="Folders in code1, middle"></Keywords> <Keywords name="Folders in code1, close">}</Keywords> <Keywords name="Folders in code2, open"></Keywords> <Keywords name="Folders in code2, middle"></Keywords> <Keywords name="Folders in code2, close"></Keywords> <Keywords name="Folders in comment, open"></Keywords> <Keywords name="Folders in comment, middle"></Keywords> <Keywords name="Folders in comment, close"></Keywords> <Keywords name="Keywords1">data default dynamic locals module output provider resource terraform variable</Keywords> <Keywords name="Keywords2">false null true</Keywords> <Keywords name="Keywords3">else endfor endif for if in</Keywords> <Keywords name="Keywords4">abs abspath alltrue anytrue base64decode base64encode base64gzip base64sha256 base64sha512 basename bcrypt can ceil chomp chunklist cidrhost cidrnetmask cidrsubnet cidrsubnets coalesce coalescelist compact concat contains csvdecode defaults dirname distinct element file filebase64 filebase64sha256 filebase64sha512 fileexists filemd5 fileset filesha1 filesha256 filesha512 flatten floor format formatdate formatlist indent index join jsondecode jsonencode keys length list log lookup lower map matchkeys max md5 merge min nonsensitive one parseint pathexpand pow range regex regexall replace reverse rsadecrypt sensitive setintersection setproduct setsubtract setunion sha1 sha256 sha512 signum slice sort split strrev substr sum templatefile textdecodebase64 textencodebase64 timeadd timestamp title tobool tolist tomap tonumber toset tostring transpose trim trimprefix trimspace trimsuffix try upper urlencode uuid uuidv5 values yamldecode yamlencode zipmap</Keywords> <Keywords name="Keywords5"></Keywords> <Keywords name="Keywords6"></Keywords> <Keywords name="Keywords7"></Keywords> <Keywords name="Keywords8"></Keywords> <Keywords name="Delimiters">00${ 00%{ 01$${ 01%%[ 02} 02} 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21&apos; 21&quot; 22\ 22\ 23&apos; 23&quot;</Keywords> </KeywordLists> <Styles> <WordsStyle name="DEFAULT" fgColor="FFFFFF" bgColor="808080" fontStyle="0" nesting="0" /> <WordsStyle name="COMMENTS" fgColor="008040" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="LINE COMMENTS" fgColor="008040" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="NUMBERS" fgColor="FF0000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS1" fgColor="FF00FF" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS2" fgColor="FFFF00" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS3" fgColor="00FFFF" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS4" fgColor="00FFFF" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="OPERATORS" fgColor="00FFFF" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN CODE1" fgColor="808080" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS1" fgColor="8080FF" bgColor="FFFFFF" fontStyle="0" nesting="16781440" /> <WordsStyle name="DELIMITERS2" fgColor="FF0080" bgColor="FFFFFF" fontStyle="0" nesting="128" /> <WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS7" fgColor="FF0000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS8" fgColor="808080" bgColor="FFFFFF" fontStyle="0" nesting="1" /> </Styles> </UserLang> </NotepadPlus>

    Thanks to Ivan Radić for his excellent UDL 2.1 documentation; I wouldn’t have made it this far without it.

  • How to delete this on notepad?

    7
    0 Votes
    7 Posts
    526 Views
    Marcin TomczakM

    @alan-kilborn
    Thank u Alan for help and your time :)

  • --> About how to center Text

    3
    0 Votes
    3 Posts
    2k Views
    Alan KilbornA

    @juan-de-dios-jurisch-y

    OK, but what you are describing really isn’t “centering” text – well, maybe visually for you “at this moment” but what if you resize Notepad++'s window? – that “centering” goes to heck.

    So…this “tip” is of extremely low value (sorry).

  • How to style an element in a pre-made UDL? (dark mode problem)

    3
    0 Votes
    3 Posts
    400 Views
    Geoff BaysingerG

    @peterjones Thank you. Got it from there, and the inherit mode on the default style worked like a charm.

  • Crash triggered chronic padding around text editing widget

    7
    0 Votes
    7 Posts
    2k Views
    Terry RT

    @PeterJones said in Crash triggered chronic padding around text editing widget:

    I personally think it’s Slack or other such conferencing software, because some of the earlier reports mentioned other brands of those types of apps, from what I remember… and the whole mess started in late March 2020, right when everyone in the US was starting to frequently use such software for an externally-caused change in working conditions.

    Thanks @PeterJones for that insight and the links. I’ve just had a good read of the github thread. Probably the longest I’ve ever spent on github, don’t have an account there and don’t intend to but have ventured over there on occasion for a bit of “light” reading.

    But I take umbridge at the twitter link. I abhor those social media sites and feel that it is dragging Notepad++ down to even venture into that area, sort of cheapens it! I almost feel dirty having “touched” twitter to see what that link had to offer.

    So for any future issues on the GUI (re)drawing of Notepad++ issue I’ll make sure to reference the github thread. Certainly looks like the diagnostics is a lot further ahead that I believed. That’s good, however it still remains to be seen how the solution will present itself. Given other (MS) apps have also been affected we can hardly expect Notepad++ developers to be made liable to produce a solution.

    Terry