• Drag to reorder documents in Documet List?

    9
    0 Votes
    9 Posts
    1k Views
    e-motivE

    Existing feature request right here -> github issue 2221

    Also, like said above, although this is not drag and drop the document list follows the tab bar and even if the tab bar is hidden you can still use the shortcuts from the tab bar to position files in the document list (down, up, start, end, …) (CTRL-SHIFT_PD, …)

  • Docker use of Notepad++

    2
    0 Votes
    2 Posts
    467 Views
    Lycan ThropeL

    @Shaun-Merrill ,
    Notepad++ doesn’t have a license, per se. It’s freeware…so what are you going on about?

  • Toolbar spacing has changed in latest version?

    3
    0 Votes
    3 Posts
    264 Views
    VTGroupGitHubV

    @PeterJones You answer was 100% correct. Thank you! I do use Customize Toolbar, and by simply removing the Show All Characters button, my previous layout has returned.

    When I have a minute, I’ll put it back with a custom icon. Thanks for that suggestion too.

  • Can folding rules be applied to Normal Text?

    2
    0 Votes
    2 Posts
    223 Views
    PeterJonesP

    @MMasutin ,

    Normal Text has no folding rules available. You would need to use a lexer of some sort, whether a builtin or a UDL.

    A UDL is “closest” to Normal Text, in that it won’t highlight any text unless you explicitly tell it what to highlight. So then you could just define a FoldingUDL with Folding rules (no styles applied to the folding keywords), and no other keywords defined, and it would be essentially Normal Text + Folding.

  • Separate Question and Answer about 1000 topics

    8
    0 Votes
    8 Posts
    635 Views
    Mark OlsonM

    Here’s my PythonScript script, which can output a CSV or TSV file while ensuring that each row has the right number of columns and any instances of the column separator inside a column are handled correctly.

    ''' ====== SOURCE ====== Requires PythonScript (https://github.com/bruderstein/PythonScript/releases) Based on this question: https://community.notepad-plus-plus.org/topic/25962/separate-question-and-answer-about-1000-topics ====== DESCRIPTION ====== Converts a list of questions in the following format into a RFC-4180 compliant CSV file (in other words, a CSV file that is designed to be easy for lots of applications to read) ====== EXAMPLE ====== Assume that you have the text below (between the ------------ lines): ------------ 1.1.1 This is question number 1? "This is answer" 1 with option 1 This, is answer 1, with option 2 1.1.2 This is question number 2? This is answer 2, with "option 1" This is answer 2 with option 2 This is answer 2 with option 3 1.1.3 This is question "number 3"? This is answer 3 with option 1 1.1.4 This is question, number 4? This is answer 4 with option 1 This is answer 4, with option 2 This is answer 4 with "option" 3 This is answer 4 with option 4 ------------ This script will output the following CSV file (between the ------------ lines) ------------ question,option 1,option 2,option 3,option 4 1.1.1 This is question number 1?,"""This is answer"" 1 with option 1","This, is answer 1, with option 2",, 1.1.2 This is question number 2?,"This is answer 2, with ""option 1""",This is answer 2 with option 2,This is answer 2 with option 3, "1.1.3 This is question ""number 3""?",This is answer 3 with option 1,,, "1.1.4 This is question, number 4?",This is answer 4 with option 1,"This is answer 4, with option 2","This is answer 4 with ""option"" 3",This is answer 4 with option 4 ------------ ''' from Npp import editor, notepad import json def convert_q_list_to_csv_main(): # this is set to ',' to make a CSV file. # you could instead use '\t' if you wanted a TSV (tab-separated variables) file SEP = ',' question_lines = [] def to_RFC_4180(s: str, sep: str) -> str: if '"' in s or sep in s or '\r' in s or '\n' in s: return '"' + s.replace('"', '""') + '"' return s editor.research(r"((?'question'^\d+\.\d+\.\d+ +(.*\?)$))(?:\R(?!(?&question)).*)+", lambda m: question_lines.append(m.group(0).splitlines())) print(json.dumps(question_lines, indent=4)) max_n_options = max(len(x) for x in question_lines) header_text = 'question' + SEP + SEP.join('option %d' % ii for ii in range(1, max_n_options)) out_line_texts = [header_text] for question in question_lines: RFC_4180_texts = [] for ii in range(max_n_options): if ii >= len(question): RFC_4180_texts.append('') else: RFC_4180_texts.append(to_RFC_4180(question[ii], SEP)) out_line_texts.append(SEP.join(RFC_4180_texts)) notepad.new() editor.setText('\r\n'.join(out_line_texts)) if __name__ == '__main__': convert_q_list_to_csv_main() del convert_q_list_to_csv_main

    Before you ask, I made the odd programmatic choice to define helper functions and global constants inside the main function to avoid polluting the global PythonScript namespace.

  • 0 Votes
    3 Posts
    406 Views
    Alan KilbornA

    @PeterJones said in Curiosity: what apps / services were-built-on / are-currently-maintained-with Notepad++?:

    the most important piece of software to be built/maintained (ie, typed) with Notepad++ is of course Notepad++.

    And I’m not sure this is even true. :-)
    At least when I’m doing development with Notepad++ source code, I use the Visual Studio editor/IDE, not Notepad++.
    Not sure what others do (but I would suspect the same).

  • page breaks

    4
    0 Votes
    4 Posts
    372 Views
    PeterJonesP

    @Mark-Olson said in page breaks:

    you can type  and thus insert the character without needing to use a GUI

    If you have to try to remember that, why not instead remember Alt+012 (on numeric keypad) which has worked in any Windows application for literally decades, and requires no plugins?

  • imagecreatefrombmp not recognised

    3
    0 Votes
    3 Posts
    225 Views
    Dion FitzgeraldD

    @PeterJones said in imagecreatefrombmp not recognised:

    @Dion-Fitzgerald ,

    Please, can this be fixed in future releases.

    This Forum is not the feature request location, as explained in our FAQ. Even if you went to github and made a feature request, I am doubtful that anyone would bother to do a PR for a single keyword – but if you found a list of keywords that were missing, someone might be more likely to bother.

    However, if it’s important to you to get it highlighted right away, go to Settings > Style Configurator > Language: php > Style: WORD and add imagecreatefrombmp to the User-defined keywords box, then Save & Close, and it will be highlighted for you on that computer, from then on. (The reason Notepad++ has the user-defined keywords option for most languages is that it is impossible for one volunteer developer to know all 80+ languages well enough to know if there’s a few missing keywords or not, and on any language, there maybe any number of lesser-used keywords that would only be important to a subset of users – so the user-defined keyword box is there for the users who care about those holes or want those extra keywords to add them themselves. PHP already has >9000 keywords in Notepad++, so it’s not surprising there is at least one, and likely more, missing – even if there were 100 missing that would only be 1% of the total, which isn’t hugely significant.)

    thanks

  • Since which version did this appear?

    2
    0 Votes
    2 Posts
    253 Views
  • Manual-Indent v Auto-Indent v Smart-Indent

    11
    0 Votes
    11 Posts
    1k Views
    Alan KilbornA

    @Coises said in Manual-Indent v Auto-Indent v Smart-Indent:

    Not too often mixed within the same file, but from one file to the next, certainly. If it were a menu-accessible, per-tab setting, that wouldn’t be so bad.

    There was a proposal recently on the github issues site concerning having the indent settings for the current file shown on the status bar, with the ability to click on it and adjust the settings for the current tab. Of course I can’t find this now; it may have been part of the discussion in the comments of the issue that is bringing us a three-pronged auto-indent setting.

  • Case on/at replace.

    7
    0 Votes
    7 Posts
    389 Views
    guy038G

    Hello, @joão-borloth, @peterjones, @coises and All,

    @joão-borloth, here is my contribution to your problem ! I assume these following statements :

    Regarding the searched expression :

    The entire searched expression begins and ends each line and contains, at least, three characters

    The searched expression begins with two letter characters and ends with a letter character

    The characters of the searched expression, from the third one to the last but one, may be any char

    Regarding the replacement expression :

    The replacement expression contains, at least, two characters

    The replacement expression begins with a letter character and ends with a letter character

    The characters of the replacement expression, from the second one to the last but one, may be any char

    Regarding the case rules :

    The case of the first letter of the replacement expression will be the same as the case of the first letter of the searched expression

    The case of the last letter of the replacement expression will be the same as the case of the last letter of the searched expression

    The case of the all other characters of the replacement expression will be the same as the case of the second letter of the searched expression

    First, giving your general template :

    Screw SCREW screw ScreW sCREW

    I created the same template for two other expressions :

    Test TEST test TesT tEST Wonderful time WONDERFUL TIME wonderful time Wonderful timE wONDERFUL TIME

    And using the following regex S/R :

    SEARCH (?-is)^(?:(\u)|\l)(?:(\u)|\l).*(?:(\u)|\l)$

    REPLACE (?1N:n)(?2AI:ai)(?3L:l)

    I did get the 3 identical blocks, containing the word nail , below :

    Nail NAIL nail NaiL nAIL Nail NAIL nail NaiL nAIL Nail NAIL nail NaiL nAIL

    So, now, the next problem ( which, indeed, is rather the initial problem ! ) is how to get the replacement text, whatever the text used ?

    Again, we’ll use a regex replacement :

    SEARCH (?-s)^(.)(.*)(.)$

    REPLACE \(\?1\u\1:\l\1\)\(\?2\U\2\E:\L\2\E\)\(\?3\u\3:\l\3\)

    For example, given all case syntaxes of the word nail :

    nail naiL naIl naIL Nail NaiL NaIl NaIL nAil nAiL nAIl nAIL NAil NAiL NAIl NAIL

    You can verify that we always get the same correct result, below :

    (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l) (?1N:n)(?2AI:ai)(?3L:l)

    IF, we extend the use of this regex S/R to other expressions, whatever their case, it does give correct results ! For instance, given this short list, below :

    naiL WINDOW An imPRESSive caSTLe bIg Az

    We correctly get this OUTPUT :

    (?1N:n)(?2AI:ai)(?3L:l) (?1W:w)(?2INDO:indo)(?3W:w) (?1A:a)(?2N IMPRESSIVE CASTL:n impressive castl)(?3E:e) (?1B:b)(?2I:i)(?3G:g) (?1A:a)(?2:)(?3Z:z)

    So, the procedure is :

    First, given a specific word, which will be the replacement expression, you’ll find the true replacement regex syntax with :

    SEARCH (?-s)^(.)(.*)(.)$

    REPLACE \(\?1\u\1:\l\1\)\(\?2\U\2\E:\L\2\E\)\(\?3\u\3:\l\3\)

    Secondly, with the following regex S/R :

    SEARCH (?-is)^(?:(\u)|\l)(?:(\u)|\l).*(?:(\u)|\l)$

    REPLACE : The result of the PREVIOUS regex S/R

    It would replace any expression with the replacement expression, using our specific case rules !

    Two examples :

    Expression to change : Screw and expression to replace An impressive castle. Thus :

    SEARCH (?-is)^(?:(\u)|\l)(?:(\u)|\l).*(?:(\u)|\l)$

    REPLACE (?1A:a)(?2N IMPRESSIVE CASTL:n impressive castl)(?3E:e)

    So, from this INPUT text :

    Screw SCREW screw ScreW sCREW

    We would get this OUTPUT :

    An impressive castle AN IMPRESSIVE CASTLE an impressive castle An impressive castlE aN IMPRESSIVE CASTLE

    Expression to change : Wonderful time and expression to replace Az. Thus :

    SEARCH (?-is)^(?:(\u)|\l)(?:(\u)|\l).*(?:(\u)|\l)$

    REPLACE (?1A:a)(?2:)(?3Z:z)

    So, from this INPUT text :

    Wonderful time WONDERFUL TIME wonderful time Wonderful timE wONDERFUL TIME

    we would get this OUTPUT text :

    Az AZ az AZ aZ

    Best Regards,

    guy038

  • Scroll bar for User Defined Language window

    10
    0 Votes
    10 Posts
    681 Views
    deleeleeD

    @Coises

    Thanks, I keep forgetting about the github 🤦‍♀️ I’ve added to the discussion. It would be great to see this fixed. Unfortunately, I’m nowhere near an adequate enough programmer to contribute.

  • How do I get rid of the mouse cursor

    2
    0 Votes
    2 Posts
    391 Views
    PeterJonesP

    @Leo ,

    I’ve never done anything that gets it “stuck” in the mouse-arrow instead of the mouse-caret.
    When your cursor is over the GUI elements, it will be an arrow; when it’s over normal text to be edited, it will be a caret; and when it’s over selected text, it will be an arrow again:

    92cbf07c-0054-424e-af92-a9f89669433f-33.png

    35194444-ab03-4001-ba1b-7ef44efd96fc-49.png

    Does it stay that way if you exit Notepad++ completely and restart the app? Or if you reboot Windows?

    If it’s not just something as simple as selected text or restart N++ or reboot, I don’t have any other ideas, so you’ll have to wait for someone else to chime in.

  • Notepad++ lags for a second

    8
    0 Votes
    8 Posts
    1k Views
    PeterJonesP

    @Lycan-Thrope said in Notepad++ lags for a second:

    This is the response from chatgpt for just the first few lines of the question above of the OP:

    Thanks for the confirmation. Situation has been resolved (as you can tell from the missing post)

    Sorry about the junk.

  • add "X" "Y" "Z" before coordinates

    2
    0 Votes
    2 Posts
    227 Views
    Michael VincentM

    @Karel-Plíva said in add "X" "Y" "Z" before coordinates:

    -19.560 20.000 0.905

    Find what: ^(-?\d+.\d+)\s(\d+.\d+)\s(\d+.\d+)
    Replace with: X\1 Y\2 Z\3
    Regular expression

    Cheers.

  • all of the 8.6.xx versions have a trojan on them

    3
    -1 Votes
    3 Posts
    487 Views
    Jumo MumoJ

    Tell us the name of the antivirus/anti-malware product you’re using so we can report it as a false positive.

    You can also upload your notepad++.exe to virustotal and paste the result link here.

  • Poll: Find in Files Hits Position

    12
    3 Votes
    12 Posts
    892 Views
    Jumo MumoJ

    A is 1000% better! As the original bug whisperer, I hereby invoke my “First Reporter Privilege” and decree that my vote should count as 10! 🎉✨

  • spam in github

    5
    1 Votes
    5 Posts
    343 Views
    donhoD

    Sorry for the problem caused by the political edition, again.

  • Getting "Invalid Regular Expression" for an extremely simple expression

    51
    0 Votes
    51 Posts
    7k Views
    CoisesC

    @guy038 said in Getting "Invalid Regular Expression" for an extremely simple expression:

    At this point, I tried to select all the zones around these 11 matches in a small new file, that I named Matches.txt. Then, using the Mark dialog with (?:[^,]*,){13}[\u\l], against this small file, it does return 10 matches ( not 11 as explained in the next post ! )

    However, it is distressing to note that the equivalent regex (?:.*?,){13}[\u\l] still fails against this tiny Matches.txt file, of only 16,138 bytes :-((

    Unfortunately, it’s quite certain that cases, like that one, may arise when using most of the available regex engines !

    There are two ways an implementation can look at a regex:

    A regex is a definition of matching character strings. A regex is a procedure for matching character strings.

    From the first perspective, your two expressions are equivalent: they specify the same strings as matches. From the second perspective, they are not: they specify different procedures for finding strings that match.

    No one has found a way to implement back references using method 1. Once your regular expression syntax includes the ability to use back references, you are stuck with the procedural interpretation.

    There are other features of PERL-compatible regular expressions that present problems, but back references are the killer.

    I’m speculating here, but I think once you include any back reference in an expression, it breaks the ability to process any part of the expression that occurs before the back reference as a definition rather than a procedure. (I’m not certain of that. I have no doubt someone does know the answer to that… but that someone isn’t me.)

    So I think you’ll find all those more efficient regular expression engines implement a severely restricted syntax for regular expressions which omits features none of us would like to do without (particularly, back references).

    What I’ve also speculated is that perhaps a regular expression engine could include two engines: one which processes using the ”definition” approach for expressions to which it is applicable, and one which uses the “procedural” approach for the remaining expressions. I don’t know if any do that now.

  • Lost my R style settings with 8.6.7 update.

    6
    0 Votes
    6 Posts
    657 Views
    PeterJonesP

    @Mark-Johnson said in Lost my R style settings with 8.6.7 update.:

    Select Theme: DarkModeDefault

    Then saving stylers.xml will not be enough for you. As I said, each theme stores its style-configurator settings separately. If you want to save customizations to DarkModeDefault, then you would have to backup %AppData%\Notepad++\themes\DarkModeDefault.xml (or, for other users who aren’t using AppData, in the appropriate Config File Location, as linked above)