• 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
    181 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
    447 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
    214 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
    177 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
    447 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
    450 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
    380 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
    942 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

  • Search/Replace Windows out of screen.

    5
    0 Votes
    5 Posts
    3k Views
    PeterJonesP

    A couple years ago, I said,

    Update for future users: instead of the Alt+SPACEBAR trick, you can also try to hit Ctrl+F multiple times. I learned that trick for changing monitors in another thread, and it also seems to work for moving it from mostly off-screen to being well-centered.

    Updated information: newer versions (v8.1.3 and later) don’t allow this, because the second Ctrl+F (which is the first Ctrl+F that the dialog handles) now selects the FIND tab in that dialog, rather than centering the Find dialog box itself. See “Double Ctrl+F no longer moves find dialog” and “Double Ctrl+F won’t bring the find dialog in fromt of the primary window

  • Regular Expression with find a pattern and replace

    2
    0 Votes
    2 Posts
    3k Views
    PeterJonesP

    @shashi-bhosale ,

    When I read your post earlier this week, I had hoped someone else would chime in, because I was pretty busy. Sorry no one else had a chance to reply before I finally found a spare moment to go back through unanswered questions.

    If I have interpreted your request, then if I start with

    CREATE PROCEDURE [dbo].[ki_APSGetTopLevelDemand_BKUP] ( @IpRefType AS VARCHAR(100), @IpRefNum AS VARCHAR(100), @IpRefLine AS INT ) AS blah blah blah CREATE PROCEDURE [dbo].[ki_APSGetTopLevelDemand_BKUP] ( @IpRefType AS VARCHAR(100), @IpRefNum AS VARCHAR(100), @IpRefLine AS INT ) AS

    and use

    FIND = (\)\s*AS) REPLACE = $0\r\n@site = 'Site' SEARCH MODE = regular expression

    After doing the two replacements (or a REPLACE ALL), I get what I think you want:

    CREATE PROCEDURE [dbo].[ki_APSGetTopLevelDemand_BKUP] ( @IpRefType AS VARCHAR(100), @IpRefNum AS VARCHAR(100), @IpRefLine AS INT ) AS @site = 'Site' blah blah blah CREATE PROCEDURE [dbo].[ki_APSGetTopLevelDemand_BKUP] ( @IpRefType AS VARCHAR(100), @IpRefNum AS VARCHAR(100), @IpRefLine AS INT ) AS @site = 'Site'

    If you want to know more about the individual tokens in my search and replace, look at the official search/regex section of the usermanual, linked below, for the following concepts

    token see usermanual section about parentheses capture groups \s character escape sequences * multiplying operators \r\n control characters (note that they are case sensitive)

    ----

    Useful References Please Read Before Posting Template for Search/Replace Questions FAQ: Where to find regular expressions (regex) documentation Notepad++ Online User Manual: Searching/Regex
  • "Function List" current function highlighting is too light? (Part 2)

    3
    2 Votes
    3 Posts
    261 Views
    Alan KilbornA

    @peterjones said in "Function List" current function highlighting is too light? (Part 2):

    regarding “forbidden” error on the older topic: I couldn’t replicate

    I couldn’t replicate either.
    I put a post in the older topic that points here.

  • "Function List" current function highlighting is too light?

    23
    1 Votes
    23 Posts
    2k Views
    Alan KilbornA

    More on the topic of this thread is found HERE.

  • I can't install the JSTool plugin,How can i figure it

    2
    0 Votes
    2 Posts
    3k Views
    PeterJonesP

    @jiyun-gou ,

    When I installed the plug-in, the following screenshot appeared for a period of time, and it restarted directly. But the difference was not installed successfully

    You will have to be more specific.

    If you look in the Plugins menu, is there an entry for JSTool? If not, if you looks at Plugins > Plugins Admin, does it list JSTool under Available, Updates, or Installed?

    I just tried on a fresh v8.1.9.1-64bit: the first time I tried to install JSTool, it restarted Notepad++, but didn’t install. The second time I tried, I saw the progress bar briefly, and when Notepad++ restarted, JSTool was in the menu. So maybe you just need to try again.

    Also, your download box says plugin version 1.2001.1, but when I downloaded from NPP 8.1.9.1, it downloaded plugin version 1.2107.2 … I don’t know if maybe the developer of that plugin got rid of the old version when they released the new version… but maybe it’s not downloading the old version correctly. If so, maybe you could download the newest zipfile directly and unzip the JSMinNPP.dll into c:\program files\Notepad++\Plugins\JSMinNPP\JSMinNPP.dll and restart Notepad++ yourself.

  • Massive empty whitespace ?

    5
    0 Votes
    5 Posts
    268 Views
    EkopalypseE

    :-) rather a dimly lit candle :-D

  • Column Sort plugin; NppColumnSort-1.0.0.2

    8
    0 Votes
    8 Posts
    1k Views
    Michael VincentM

    @brendan-ford said in Column Sort plugin; NppColumnSort-1.0.0.2:

    error that says cant run a 32 bit plugin.

    You can’t on 64-bit. Download the correct plugin version:

    https://github.com/blumu/NppColumnSort/releases/tag/1.0.0.2-64bits

    Cheers.

  • Date Time (customized)

    5
  • "Monitor with Notepad++" windows explorer context menu

    3
    0 Votes
    3 Posts
    862 Views
    elazar cohenE

    @peterjones Sorry about that.
    For anyone who’s interested, there is already a feature-request for it here https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10562.