• Plugin macro copy paste

    3
    0 Votes
    3 Posts
    914 Views
    Frank ÖsterF

    @PeterJones
    Wow it worked flawlessly! I’m just getting in to the space and I’m continuously flabergasted by how powerful a tool NPP can be. It’s exciting really! Thanks for your help, I’m sure that probably existed somewhere but I couldn’t find it with my search criteria…
    I’ll be saving this as a bookmark for sure!

    Thanks!

  • Adjust Numbers in an expression by a set amount

    16
    0 Votes
    16 Posts
    1k Views
    Leon Bob NoëlL

    @Alan-Kilborn if I was receiving answers while I was able to actually do it sure, but then if not I’d have to then ask if there was a way to do it. That seems much less efficient. I know when I’m helping someone I’d much rather have them ask questions right away. The longer they wait the less likely I’ll be looking at the forum to know they need a response. Maybe that’s just me, but having a question & waiting to ask it because it might not be necessary is just rude to the person giving help, while asking questions that are unnecessary right away is only really harmful to the ego of the asker, I’d rather look like I don’t know something I actually don’t know, than go to do something & have to come back & ask for more information because I was afraid of looking like an idiot, & thereby actually being an idiot

  • Light theme with consistent coloring

    3
    0 Votes
    3 Posts
    1k Views
    T

    I imagine there have to be lots of other themes available, but I did merely nothing.
    Is that due to lack of an official place (hub) to share themes? Is everybody who does not like the default theme doing his own thing and their themes never hit the internet?

  • custom button

    4
    0 Votes
    4 Posts
    722 Views
    Alan KilbornA

    @Philippe-Lajeu said in custom button:

    and how do you enable that ? :) please

    A good into to setting up a script is found HERE.

  • File changed status not visible in Folder as Workspace view

    3
    1 Votes
    3 Posts
    218 Views
    PeterJonesP

    @christopherpow ,

    The tab bar icon for each edited tab will show either a red disk icon for unsaved and blue disk icon for saved; or, with Settings > Preferences > General > Tab Bar > Alternate Icons checked, it will show a pencil for unsaved or checkmark for saved. Either way, the information is already available at-a-glance with the current implementation.

    Given that the Folder As Workspace might take up more than one screen, with the edited file scrolled out of view anyway, and that any edited-but-unsaved file will still have a tab in the tabbar, I think the tabbar indicator would be more obvious / noticeable than one in FaW panel. But “obvious / noticeable” is in the eye of the beholder.

    If that’s not sufficient, feel free to make a feature request as Alan linked, but understand that not all features requested are ever implemented, and if they are, it might be a while.

  • How to remove multiple lines?

    2
    0 Votes
    2 Posts
    5k Views
    PeterJonesP

    @Sameh-El-Desoki ,

    Welcome to the Notepad++ Community Forum. I will append some useful generic information at the end of this post for how to ask your question in a way that will improve the quality of answers that you get, and provides links for how to learn how to do the fancy search/replace on your own rather than relying on us. Avail yourself of that advice.

    I will do my best to answer based on the information you have given.

    You will want to use the “regular expression” search mode.

    Your first request said,

    I want to delete lines containing https://***:2083

    The notation you gave was very nearly the regex expression needed for mathcing that portion. .+ will match 1 or more of any character. If you restrict it to “as few as possible”, .+?, then it will go from the https:// to the first :2083 in the match.

    Then, all you have to do is add the regex syntax for grabbing the first part of the line and last part of the line (including newline or end of file), and bring it all together

    FIND = ^.*?https://.+?:2083.*?(\R|\Z) REPLACE = empty Search Mode = regular expression Uncheck . matches newline REPLACE ALL

    Translates:

    keep https://bnasicoasdasasdasfo.biz:2083|cthakzzq|Ch3 keep https://bnasfasfasdaso.com:2083|vichlvcl|Ch keep https://bodasdasdasdlutions.com:2083|hd keep

    into

    keep keep keep keep

    if possible want to delete lines containing . like domain.com or domain.net

    To match a literal . character in a regex, escape it like \.

    So the pattern will be start-of-line, 0 or more chars, literal ., 0 or more chars, end-of-line/end-of-file

    FIND = ^.*?\..*?(\R|\Z) REPLACE = empty Search Mode = regular expression Uncheck . matches newline REPLACE ALL

    translates

    This line has no dot This ends in dot. .This started in dot domain.com domain.net no dot

    to

    This line has no dot no dot

    Please note that better examples, with lines to delete and lines to keep, would help us confirm the regex works before we post our answer, rather than you having to tell us, “no, I really meant xxx”.

    Please note that this forum is not a “do my data transformation for me”, or even a “generic regex help forum”. We will give new users a couple of rounds of regex help, but really, this forum is about so much more than just “make my data change from X to Y”. You will get better help if you show an effort and willingness to learn.

    ----

    Do you want regex search/replace help? Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you. All example text should be marked as literal text using the </> toolbar button or manual Markdown syntax. To make regex in red (and so they keep their special characters like *), use backticks, like `^.*?blah.*?\z`. Screenshots can be pasted from the clipboard to your post using Ctrl+V to show graphical items, but any text should be included as literal text in your post so we can easily copy/paste your data. Show the data you have and the text you want to get from that data; include examples of things that should match and be transformed, and things that don’t match and should be left alone; show edge cases and make sure you examples are as varied as your real data. Show the regex you already tried, and why you thought it should work; tell us what’s wrong with what you do get. Read the official NPP Searching / Regex docs and the forum’s Regular Expression FAQ. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries.

  • Switch to next file in Macro?

    3
    0 Votes
    3 Posts
    964 Views
    JssampJ

    @PeterJones Indeed that was the key. I was using Control-Tab to switch tabs. I didn’t know about Control-PageDown. Thank you so much. I spent several hours trying to figure that out, even reading the scintilla source from github. Should have come here first but I wanted to do my due diligence.

  • Add Parse Rules to Language None (Normal Text)?

    2
    0 Votes
    2 Posts
    824 Views
    PeterJonesP

    @Robin-Andrews-0 said in Add Parse Rules to Language None (Normal Text)?:

    I have spent a long time trying to get markdown to generate a function list so I can navigate easily.

    Getting the regex right for functionList parsing can be tricky. It’s easier when you’ve just got a function, rather than also having a class… but things that you really think should work don’t always work in practice, and it’s really hard to debug.

    It’s been a right headache and I did not succeed.
    I tried creating a UDL, which I didn’t want to do as I then had to manually define the colours to match my theme etc, and I write markdown as plaintext and want no highlighting.

    You can define a UDL that has nothing more than a name, and no other formatting. Well, I guess, as you said, if you are not using the default theme then you’ll have to define the Default style for that UDL to match your theme’s default standard text style; and maybe the number formatting, too. But that’s only a few clicks to get it all set up. And you don’t have to add any keywords or similar

    I persisted though as it looked like there was no other way, but I couldn’t get overrideMap.xml to be read for the UDL…

    I don’t understand why users have so much trouble with this aspect. This has worked the first try, every time for me.

    To the default language (None, Normal Text). Is this possible please? Or is there some simple way to make markdown work with a function list for headings and zero formatting, just like plain text?

    You cannot associate a functionList parser with Normal Text.

    I just unzipped a fresh v8.0-64bit portable to experiment with your situation. But these instructions should work with v7.9.1 and newer.

    Set theme to “Solarized-light”, which has FG=(101,123,131) BG=(253,246,227) Saved a text file called 21302.ra which contains the text# one This is a test ## two 123456789 ### three blah Language > Define Your Language > Define Your Language Folder & Default > Default Style > Styler = FG and BG as with “Solarized-light” Comment & Number > Number Style > Styler = FG and BG as above SaveAs = Markdown Ext. = ra Close UDL editor In 21302.ra, select Language > Markdown: the text file I showed matches the FG and BG of the selected theme Open your overrideMap.xml and in the User Defined Languages section, add<association id= "markdown.xml" userDefinedLangName="Markdown"/> and save Create markdown.xml in the same directory as overrideMap.xml, where the <parser...>...</parser> you showed goes inside the <NotepadPlus><functionList>...</functionList></NotepadPlus> container. Save. Exit Notepad++ application Start Notepad++ application, open 21302.ra. Display Function List panel

    f2d8ea8d-9212-4459-82b9-5b66912c8106-image.png

  • How to Practice Coding on Daily Basis

    2
    0 Votes
    2 Posts
    266 Views
  • Dark mode, there's something wrong

    2
    0 Votes
    2 Posts
    165 Views
    dinkumoilD

    You didn’t do anything wrong. Dark mode’s implementation is still incomplete, you have to be patient and wait for a solution in the future. The author of the software is already aware of that issue but decided to postpone working on a solution.

  • Per-tab reload options?

    5
    0 Votes
    5 Posts
    289 Views
  • How to find and delete multiple lines?

    9
    0 Votes
    9 Posts
    515 Views
    guy038G

    Hello, @lagey-raho, @alan-kilborn, @robin-cruise and All,

    Finally, with your raw text, in reverse video, ( thanks for this inpuut ), we now know that all your lines do not contain any leading blank characters !

    So, basically, from your last post, you want to delete any range of lines :

    Beginning with the line Solution:•••••, with this exact case

    AND

    Ending right before a line containing upper-case letters and space characters, ONLY

    OR

    Ending right before a line beginning with a number, immediately followed with a dot char

    OR

    Ending at the very end of current file !

    I assume that it’s better to replace all these deleted blocks with a single empty line to get some kind of separation !

    If so, this following regex S/R, expressed with the free-spacing mode (?x), should work :

    SEARCH : (?xs-i) ^ \h* Solution: .+? (?= ^ (?: \u+ \x20+ )* \u{2,} $ | ^ \d+ \. | \z ) REPLACE : \r\n ( or '\n' only, if your file is an UNIX one )

    Best Regards,

    guy038

  • Regex: Select all non-ASCII characters html tags

    4
    0 Votes
    4 Posts
    454 Views
    Robin CruiseR

    @guy038 said in Regex: Select all non-ASCII characters html tags:

    (?<=<p class=“OANA”><em>)[\x00-\x7F]+?(?=</em>)

    thanks a lot @guy038

  • Macro to copy text to clipboard

    3
    1 Votes
    3 Posts
    731 Views
    Karun PoudelK

    Thanks @PeterJones, that’s insightful. I will try to convert my macro to NppExec commands.

  • Textfile too big - how can I load anyway?

    3
    0 Votes
    3 Posts
    223 Views
    PeterJonesP

    @Thomas-Bastian ,

    Also, I was just reminded there is a “Big Files Plugin” which allows for quick paging in huge files. That may be of some use to you as well.

  • Is there a way to select all marked text?

    2
    0 Votes
    2 Posts
    537 Views
    Alan KilbornA

    @Adrian-Deutscher-Bishop

    There is not…but please tell us what your next step would be (after you’ve selected it).
    There aren’t a lot of options – you’ve rejected copying.

    How about cutting/deleting? Hmm, it may be valid to want to accumulate marked text from several marking operations and then wanting to cut/delete all of it.

    But we don’t know what you’re thinking unless you share it.

  • XML Tools Plugin - Can't get Pretty Print feature to work

    13
    0 Votes
    13 Posts
    10k Views
    Michele DelpianoM

    Some final words just to summarize: my issue with XML Tools Pretty Print feature not working (and making damage in other opened files) was caused by some corrupted NP++ components, probably due to some update installation glitch.
    After a clean reinstallation of NP++ everything was ok, I have been using XML Tools since then and it is doing great.

  • How to hide line numbering?

    3
    0 Votes
    3 Posts
    236 Views
    Weqas WeqasW

    @PeterJones Thank you.

  • User Defined Languages Autosave?

    4
    0 Votes
    4 Posts
    453 Views
    PeterJonesP

    @SPConnol ,

    Unlike certain stack-based help forums, the Notepad++ Community isn’t about “the one true answer”. It’s not even just a help (question + answer) forum. It’s about discussing Notepad++ in all its facets, and helping each other. Thus, there isn’t a “right answer” or “this has been answered” button, because not all discussions have “one right answer”, and often times, the discussions diverge from the original question that started the discussion: and on this forum, that’s all good, and leads toward better discussion.

    Feel free to upvote any contributions that you think were helpful to the discussion, whether they “answered the question” or just added information or insight or a good perspective.

  • How to extract ....

    4
    0 Votes
    4 Posts
    392 Views
    guy038G

    Hi, @martin-huh and All,

    Ah… OK ! So, here is the road map :

    Open your huge file in Notepad++

    Open the Mark dialog ( Ctrl + M )

    SEARCH (?-i)(?<=ECB )\w+

    Tick the three options Bookmark line, Purge for each search and Wrap around

    Click on the Mark All button

    => The appropriate words, which follow the string ECB and a space char should be highlighted in red

    Now, click on the Copy Marked Text button

    Open a new tab ( Ctrl + N )

    Paste the clipboard contents ( Ctrl + V )

    Here you are ! You get the list of all these specific words

    Now, if you prefer the list of all lines containing, at least, one of these key-words :

    Right-click on the Bookmark margin and select the Copy Bookmarked Lines item ( or use the Search > Bookmark > Copy Bookmarked Lines option )

    Again, open a new tab ( Ctrl + N )

    Paste the clipboard contents ( Ctrl + V )

    Notes :

    The in-line modifier (?-i) forces the search to be sensitive to case ( non-ignore case ), whatever you’ve ticked, or not, the Match case option

    The \w+ represents the non-null range of regex word characters to search for

    The (?<=ECB ) is a look-behind structure, so a condition which must be true before the word to match but which is not part of the match ( Note the space char before the closing parenthesis )

    So the overall regex can be expressed, in English language, as :

    Match any word which is preceded by the string "ECB ", with that exact case

    Best regards,

    guy038