• Printing multiple pages per sheet? How???

    2
    0 Votes
    2 Posts
    217 Views
    CoisesC

    @Hans-J-Albertsson said in Printing multiple pages per sheet? How???:

    Even the lowly Windows Notepad can do that… so why can’t NPP do that???

    On Windows 10, with a Brother HL-L2395DW printer, I’m not seeing any difference between Notepad and Notepad++. In both programs, multiple page printing is controlled in the printer driver, not the program. So, click File | Print…, then select the correct printer/driver in the Windows Print dialog, then click the Preferences… button. From there on, the details are specific to your printer driver.

  • Does NPP have selective box editing?

    13
    0 Votes
    13 Posts
    399 Views
    Alan KilbornA

    @PeterJones

    Is it worth some additional text in the manual, e.g. …

    Normally the caret is confined to positions on its line to the left of the line-ending character(s) [side note: not sure even if line-ending stuff is defined adequately in the manual]. When virtual space is enabled, the caret is freed from its confinement and can be placed to the right of line-endings. This has no real effect unless it is followed by the typing of some character, at which point the virtual space is filled with actual space characters to the left of the caret, to fill from the existing line entry to the column of the caret. The new line-ending is then placed to the right of the character entered.

    …or…some…such. :-)

    I mean, well, I’m clear on the virtual space concept, but new users might not be, so maybe more treatment in the manual is justified.

  • 0 Votes
    7 Posts
    1k Views
    Madhav VasanthM

    @xomx Thanks for the info

  • Does NPP have selective line editing?

    5
    0 Votes
    5 Posts
    170 Views
    Alan KilbornA

    @bofhlusr said in Does NPP have selective line editing?:

    Can npp hide all the lines in a file, and then unhide and display only the lines found in search?

    Short answer: No (again).

    There have been ideas proposed before about a Find All in Current Document search having a checkbox parameter to show only the lines with search hits (and thus hiding all others), but – I think I said this before – the hide/show lines feature in Notepad++ is not robust, so I’d think that anything based on the idea of hiding/showing lines conditionally is going to be flawed.

  • trocar ponto por vírgula na string numérica

    3
    0 Votes
    3 Posts
    525 Views
    Alan KilbornA

    @Carlos-Zucareli-Renó said in trocar ponto por vírgula na string numérica:

    change period to comma in numeric string
    Is it possible to configure in notepad ++?

    Not only are you wasting everyone’s time by not posting in English, your topic title (“replace semicolon with comma in numeric string”) doesn’t even match your posting content (“change period to comma in numeric string”).

    I won’t even try to answer, nor think about what you’re trying to ask. I’ll just “move on” unless you put some effort behind it on your end, in the form of a reformulated posting.

  • Setting Notepad++ as the default PRINT for .bat files

    2
    0 Votes
    2 Posts
    142 Views
    PeterJonesP

    @Soapboy ,

    That’s because /p is not Notepad++'s command-line option for printing (or for anything else, which is why it tries to open a file called /p). The ?-menu’s Command Line Arguments… dialog will show all the command-line options, or you can look in the Online User Manual’s Command Line Arguments page. Specifically, -quickPrint is the way to be able to make Notepad++ print the document from the command-line

  • How to move copy and replace some text ?

    4
    0 Votes
    4 Posts
    210 Views
    EkopalypseE

    @PeterJones

    Thanks, but that’s weird because I tried just dragging and dropping it because I was sure that would work, and I’m pretty sure it did in the past, but it hadn’t worked again, so I used imgur … hmm … was I hallucinating?

  • 1 Votes
    5 Posts
    523 Views
    guy038G

    Hello, @francesco-vespari, @mkupper, @peterjones and all,

    Here is my alternate solution :

    SEARCH (?-is)^(?:(?!data).)+\R|(?:(?!data).)+|(database\.schema\.[A-Za-z]{3}[0-9]{3})

    REPLACE ?1$1

    This solution keeps any empty line which already exists in the present text :

    So, for example, given this INPUT text :

    SELECT * FROM database.schema.ABC123 INNER JOIN database.schema.def456 on id1 = id2 LEFT JOIN database.schema.ghi789 on id2 = id3 WHERE 1=1 SELECT * FROM database.schema.ABC123 INNER JOIN database.schema.def456 on id1 = id2 LEFT JOIN database.schema.ghi789 on id2 = id3 WHERE 1=1 SELECT * FROM database.schema.ABC123 INNER JOIN database.schema.def456 on id1 = id2 LEFT JOIN database.schema.ghi789 on id2 = id3 WHERE 1=1

    we would get this OUTPUT one :

    database.schema.ABC123 database.schema.def456 database.schema.ghi789 database.schema.ABC123 database.schema.def456 database.schema.ghi789 database.schema.ABC123 database.schema.def456 database.schema.ghi789

    Notes :

    The first part of the search regex, after the modifiers (?-is) is ^(?:(?!data).)+\R which matches any complete line, with its line-break, ONLY IF it does NOT contain the string data, with this case, at any position of current line

    The second alternative (?:(?!data).)+ matches any part of line, which does NOT contain the string data, with this case

    Until now, just note that no group has been defined because of the two non-capturing syntaxes (?:...

    Finally, the third alternative is the string that we want to keep, i.e. the string (database\.schema\.[A-Za-z]{3}[0-9]{3}), with this exact case, which is stored as group 1

    As we use a conditional replacement ?1$1, which means : ONLY rewrite the group 1 if this group is defined, we are just left with the expected text !

    Best Regards,

    guy038

  • Open with Notepad++

    2
    0 Votes
    2 Posts
    115 Views
    PeterJonesP

    @Kevin-Burton ,

    In general, it shouldn’t go away, unless something weird happened (or maybe you upgraded your OS).

    Reinstall might work. And the User Manual has a whole page on the right-click “Edit with Notepad++” at https://npp-user-manual.org/docs/shell-extension/ – so you should read that page if the reinstall doesn’t solve it for you.

  • not able to see the search results windows in notepad++

    Locked
    35
    1 Votes
    35 Posts
    78k Views
    PeterJonesP
    Locking This Thread

    This issue has come up multiple times. To keep the discussion in one place, please read the v8.7 Search Results section of the missing-panel FAQ, and then continue any discussion in the v8.7 Search Results Missing topic.

  • v8.7 search results window not showing

    Locked
    11
    0 Votes
    11 Posts
    539 Views
    PeterJonesP
    Locking This Thread

    This issue has come up multiple times. To keep the discussion in one place, please read the v8.7 Search Results section of the missing-panel FAQ, and then continue any discussion in the v8.7 Search Results Missing topic.

  • Comparing and editing files

    7
    1 Votes
    7 Posts
    193k Views
    William CW

    Compare plugin in notepad ++ is fantastic for highlighting file difference, and multi edit makes it simultaneous changes easy.

  • Yet Another Selection Colours Question?

    9
    0 Votes
    9 Posts
    372 Views
    guy038G

    Hello, @penskeguy, @peterjones and All,

    Five years ago, I wrote the post, below, to @dinkumoil, where I asked him about some hints, advices and possible improvements. May be, you’ll be interested by some parts of my post :-)

    https://community.notepad-plus-plus.org/topic/18214/new-plugin-extsettings/32

    At this time, the Selection text color setting did not exist ( BTW, I confirm your findings about this specific setting, whether the ExtSettings dialog is opened or not : it does trigger the text color to the chosen one, only when you click on the Close button or hit the ESC key ! )

    From this post, I also extracted the part regarding the Selection Alpha setting, that I reproduced and completed which should be of some interest for you !

    If we consider, in RGB mode :

    The default current text foreground color (0,0,0)

    The default current text background (255,255,255)

    The default selection color (192,192,192)

    The default current line background color (232,232,255)

    Then, the alpha option allows you to change, BOTH, the color of background and foreground ( text ) of the resulting selection, according to the two general formulas :

    • RESULTING Selection Background = α × SELECTION Background + ( 1 - α ) × CURRENT Background with α in range [0,1] • RESULTING Selection Foreground = α × SELECTION Foreground + ( 1 - α ) × CURRENT Foreground with α in range [0,1]

    In other words, with an α transparency, transposed in range [0-255], we get :

    Resulting Bg Red = ( α × 192 + ( 255 - α ) × 255 ) / 255 for part of selection NOT in CURRENT line ¯¯¯ Resulting Bg Green = ( α × 192 + ( 255 - α ) × 255 ) / 255 for part of selection NOT in CURRENT line ¯¯¯ Resulting Bg Blue = ( α × 192 + ( 255 - α ) × 255 ) / 255 for part of selection NOT in CURRENT line ¯¯¯ Resulting Bg Red = ( α × 192 + ( 255 - α ) × 232 ) / 255 for part of selection within CURRENT line ¯¯¯¯¯¯ Resulting Bg Green = ( α × 192 + ( 255 - α ) × 232 ) / 255 for part of selection within CURRENT line ¯¯¯¯¯¯ Resulting Bg Blue = ( α × 192 + ( 255 - α ) × 255 ) / 255 for part of selection within CURRENT line ¯¯¯¯¯¯ And : Resulting Fg Red = ( α × 192 + ( 255 - α ) × 0 ) / 255 = α × 192 / 255 WHATEVER the location of the SELECTION ¯¯¯¯¯¯¯¯ Resulting Fg Green = ( α × 192 + ( 255 - α ) × 0 ) / 255 = α × 192 / 255 WHATEVER the location of the SELECTION ¯¯¯¯¯¯¯¯ Resulting Fg Blue = ( α × 192 + ( 255 - α ) × 0 ) / 255 = α × 192 / 255 WHATEVER the location of the SELECTION ¯¯¯¯¯¯¯¯

    As α value increases towards 255, the gray colors of selected text and the background converge, reducing contrast between them and, when α = 255, color of Fg = color of Bg = (192,192,192), leading to an invisible selected text !!

    On the contrary, as α value decreases towards 0, the selection background becomes more and more transparent and, when α = 0, color of Fg = (0,0,0) and color of Bg = (255,255,255), except for the part within current line where color of Bg = (232,232,255)

    When the α value has the median value 128 :

    The RGB values of the background part of selection NOT in current line are 223,223,223 ≈ ( 128 × 192 + 127 × 255 ) / 255

    The RGB values of the background part of selection WITHIN the current line are 212,212,223 ≈ ( 128 × 192 + 127 × ( 232 | 232 | 255) ) / 255

    the RGB values of the foreground ( text ) of the selection are 96,96,96 ≈ 128 × 127 / 255

    So, in the end, the values between 120 and 140 and, of course, 256 seem only interesting. And value 128, in the middle, is the good compromise !

    In the specific case of α = 256, the transparency on BOTH foreground and background colors is desactiveted. However, we can consider that the resulting selection is a blend of a foreground and background opaque selection with an existing default black text on a default white background. Thus, using the above formulas and 256 as α value, we get :

    Resulting Selection Background = ( 256 × 192 + ( 255 - 256 ) × 255 ) / 255 ≈ 191,75… => Background selection color = 192,192,192

    Resulting Selection Foreground = ( 256 × 0 + ( 255 - 256 ) × 0 ) / 255 = 0 => Foreground selection color = 0,0,0

    Best Regards,

    guy038

  • Suddenly unable to search within a document!

    6
    0 Votes
    6 Posts
    183 Views
    G

    @mkupper Thank you. Interesting. I never changed those settings, but following your instructions resolved the issue.

  • Find files that don't contain

    7
    0 Votes
    7 Posts
    2k Views
    Alan KilbornA

    Here’s a real feature request for making “Find files that don’t contain” a part of standard Notepad++: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15680

  • Is there a way to keep a blank "working space" as I'm logging information?

    11
    0 Votes
    11 Posts
    401 Views
    Alan KilbornA

    @guy038 said :

    Here is the list

    Which hopefully bears some similarity to:

    https://www.scintilla.org/ScintillaDoc.html#SCI_SETYCARETPOLICY

    :-)

  • AutoIt opens notepad++ with "Folder as Workspace" open

    11
    0 Votes
    11 Posts
    466 Views
    Alchemist ZimA

    @PeterJones said (I do still highly recommend not running in Admin mode except when you absolutely have to.)
    I’m logged in as ADMIN with UAC turned off
    I know its not best practices, but it works for me

    Thank You for the help

  • Is there a settting for :"high visibility" options?

    4
    0 Votes
    4 Posts
    209 Views
    Alan KilbornA

    @DSperber1 :

    Looks a bit above my pay grade, and all things considered I think I’ll just stick with N++ in its stock form.

    Your choice, but it really isn’t that hard to just use something as opposed to writing it yourself. Someone else already did what’s “hard” about it.

    having some kind of a “ruler” effect in order to guide the eye as it scans on a single line from left to right is a very useful feature

    There can be a lot of coloring going on in a file’s presentation, depending upon the file type. Probably it was thought that an every-other line coloring was too much for the standard product. Certainly for “plain” files where there isn’t any other coloring going on, it makes some sense.

    You can always make a feature request for it; see details HERE on how exactly to do that.

  • Issues with Syntax Highlighting for a Custom Language - Emmanuel Katto

    2
    0 Votes
    2 Posts
    246 Views
    PeterJonesP

    @Emmanuel-Katto ,

    I’ve created a user-defined language (UDL) but it doesn’t seem to highlight keywords and functions correctly

    It does for me. Could you be a bit more specific?

    I’m not sure how to properly categorize keywords, functions, and comments.

    Put your various keywords in the different Keywords fields; if you have different groups of keywords that you want styled differently, put them in different fields, otherwise you can just put all the keywords together.

    For UDL, “Functions” are just a kind of keyword, from the perspective of a UDL (or any of the builtin syntax highlighters). Unless you are talking about the Function List panel in Notepad++, in which case you need to set up the FunctionList definition as described in the User Manual > Config Files > Function List Definitions. Our Function List Basics FAQ is a great starting point for understanding the structure of the Function List definition. However, getting the regex right for classes and functions can be a bit tricky… it’s usually best to start at the simplest, and slowly increase the complexity of the regex with frequent testing. (And Function List definitions are annoying, in that you have to restart Notepad++ with every change you make, no way around it.)

    UDL Comments are a separate concept from keywords, and I am not sure why you are trying to “categorize” comments alongside keywords. You just set up the Comment Line Style and/or Comment Style, and then the comments are styled separately (and, unless you enable the checkmarks in those Styler boxes, there won’t be any keywords or other syntax highlighting inside a comment)

    After making changes to the UDL, I’ve noticed that sometimes they don’t appear to take effect immediately

    They do take effect immediately. Not sure why it seems to you that they don’t.

    Start with:
    c70ea7be-99e4-4340-a3ae-03a09c119e9a-image.png

    …then add Styler settings and word2 to the 2nd group, and it takes effect immediately:
    7a2b8c5b-269c-4636-aaad-34bd84dc8389-image.png

    But because your complaints were rather vague, I can just give overview-style help. “More details” is “more better” when asking for this kind of help.

  • Why does this regexp get greedy when I use replace-all?

    7
    0 Votes
    7 Posts
    279 Views
    guy038G

    Hello, @mkupper, @alan-kilborn, @coises and All,

    So, as a summury, to delete the first standard character, only, of any line, of current file, use one the following search regex S/R :

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

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

    SEARCH (?-s)^.(.*\R)

    And use :

    REPLACE \1 or $1

    Now, an other possibility would be to add a character or string, that you are certain is NOT part of current file. Then you’ll run the two consecutive regex S/R, below :

    SEARCH ^

    REPLACE Your characterorstring ( like ¤ or xyzt , for example )

    And :

    SEARCH (?-s)¤.?    or    (?-s)xyzt.?

    REPLACE Leave EMPTY

    You may also join these two regex S/R in a single one :

    SEARCH ¤.?|(^)

    REPLACE ?1¤

    Or :

    SEARCH xyzt.?|(^)

    REPLACE ?1xyzt

    And click TWICE on the Replace All button !

    Best Regards,

    guy038