• Custom IntelliSense For Objects

    2
    0 Votes
    2 Posts
    465 Views
    EkopalypseE

    @pgSystemTester

    Npp is a general purpose editor and has no reflection/inspection built in for any programming language. But it does have the ActiveX plugin that allows JavaScript to manipulate Scintilla’s calltip and autocomplete objects at runtime.
    Another option would be to use my LSP client, but that means you need to have an LSP server running for JavaScript, since I don’t work with Java/JavaScript I haven’t tested/investigated that.

  • Problems with printing from Notepad++

    6
    0 Votes
    6 Posts
    6k Views
    Alan KilbornA

    @R-W said in Problems with printing from Notepad++:

    I got it to work by:
    Goto Preferences
    Margins/Boarder/Edge
    Uncheck Display Change History

    This thread predates the existence of Change History as a feature, so of course the posts above don’t mention it. More on Change History, including interaction with printing, can be found in its FAQ entry.

  • Hating document switching window hotkey

    6
    0 Votes
    6 Posts
    244 Views
    Alan KilbornA

    @Владислав-Пестриков said in Hating document switching window hotkey:

    i cant disable its invocation by mouse.

    How are you invoking that popup window via the mouse?

  • deleting whole lines

    2
    0 Votes
    2 Posts
    125 Views
    Alan KilbornA

    @kracovwolf

    Match lines containing an open parenthesis (somewhere) followed by a closing parenthesis (somewhere after the opening one) with:

    Find what: ^.*?\(.*?\).*\R
    Search mode: Regular expression

  • Help about prefix and quotes

    5
    0 Votes
    5 Posts
    582 Views
    Pablo Hugo RedaP

    @Ekopalypse Thank’s !!

  • Need Help Comparing Two Text Files

    2
    0 Votes
    2 Posts
    570 Views
    datatraveller1D

    @usamarslan I’m afraid Notepad++ isn’t the right tool to do your task. It sounds like you need a tool for joining CSV files like the freeware command line tools xsv (https://github.com/BurntSushi/xsv) orlistcompare (https://mg-tools.weebly.com/). However, probably no tool can do exactly what you want. In this case, you need to write a script (e.g. in Python) to fulfil your requirements.

  • Functionlist parsing issues, language specifics.

    4
    0 Votes
    4 Posts
    288 Views
    Lycan ThropeL

    @swegmike ,

    Putting this as delicately as I can, when I was developing my UDL, I ran into the same problem. Solution: Do it the way the functionList regex(boost) does it. Which means, learn the boost or rather, the NPP way of doing it. Stop trying to compare apples and oranges to get what you want done by insisting on shoehorning some other tool into it.

    Regex101.com is a great resource for someone learning regex and trying things out to interactively see how different combinations help to achieve results…but since they even have mutiple ‘flavors’ of regex, that should tell you something right there. There is no one only option. You take the good with the bad…and in this case, they don’t offer their site with a boost version. Unfortunately for you, they also don’t write Notepad++, and currently, NPP uses the Boost regex engine for whatever reason the developers chose to use it. Since Regex101.com doesn’t offer you a way to write a functionList for NPP…you’re stuck having to learn the tool this tool chose to use or forego the tool.
    I get it, it was a setback for me also and I had to learn to use the NPP/Boost, and I had a lot of help from these folks here on how to get it to work to do what I wanted, but that’s because they’re familiar with this tool, using these tools, and have developed similar things also. So…best advise, is to buckle down and start using the present tools, rather than dream of a perfect world. :) No sense wishing, when you can make a suggstion for future use, but presently use and learn the tools available. I’m still a newbie regex user, and regex101.com is my choice for interactive development of a regex, but at the end of the day, it helps me get 90% of the way there, but I still have to finish it in Boost…so…I do.
    Happy New Year to you and all the fine folks here who are willing to help you use the tools available NOW. :)

  • How can I turn off Change History

    22
    1 Votes
    22 Posts
    9k Views
    Alan KilbornA

    @Bigfootmech

    if I launch the old one, the “off” setting gets reset on the new version, turning display history back on

    This situation causes both to use the same settings, because there is only one copy of the settings on your PC.

  • How to stop Notepad++ intercepting back/forward keypresses?

    6
    0 Votes
    6 Posts
    3k Views
    Alan KilbornA

    @Alan-Kilborn said in How to stop Notepad++ intercepting back/forward keypresses?:

    The “forward” button does the “find next” and the “backward” button does the “find previous”.

    I’ve decided that to me tying the functionalities this way doesn’t make sense. The “forward” button on the mouse is toward the top of the mouse, with the “backward” button closer to me. So, my thinking is that the further button should do the find-previous and the closer button should do the find-next. Thus, I’ve changed the code to swap the functionalities.

    BTW, my fancy new mouse also has a horizontal scroll wheel, in addition to the normal vertical one:

    7f541264-85bd-4d1e-b9c6-4056b029e868-image.png

    When I try this h-wheel with Notepad++ (and other apps), I find that the scroll direction is the opposite of what I expect! (And that the scrolling isn’t “fast enough” but that’s a different thing). So, another script took care of “fixing” the h-scroll direction…for N++ at least (don’t see myself using h-scroll in other apps).

    Probably installing the add-on s/w for the mouse allows me to configure such things; I don’t normally do that but with this mouse’s advanced features, I just might.

  • please help me let my chat control my game

    2
    0 Votes
    2 Posts
    220 Views
    PeterJonesP

    @Gabr-Care said in please help me let my chat control my game:

    i am trying to learn how to use the notepad++

    You open a file in Notepad++ and start typing. If you want to do advanced stuff, go to the ? menu and choose the Online User Manual. If you have specific questions, feel free to ask them here.

    Hello i am new to coding …

    https://community.notepad-plus-plus.org/topic/15958/faq-desk-you-ve-asked-your-question-in-the-wrong-place

  • Fusing all Lines not starting with a Specific string with the line above.

    3
    0 Votes
    3 Posts
    189 Views
    guy038G

    Hello, @nili-30000, @dinkumoil and All,

    Here is my solution which :

    Rewrite the line-break if it is followed with a line having not more than 10 chars followed with a ) character

    Replace the line-break with a space character, in all the other cases

    Let’s begin :

    Do a normal selection of a range of lines that you want to modify, without including the last line-break

    Open the Replace dialog ( Ctrl + H )

    Untick all options

    Tick the In selection option ( IMPORTANT )

    Delete any text in the Find what: zone

    Replace it with the expression (?x-s) (\R) (?= .{1,10} \) ) | \R

    Write the expression ?1$1:\x20 in the Replace with: zone

    Choose the Regular expression search mode

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

    From your INPUT text, where I added some pure blank lines :

    N09-M06) Welche Maßnahme n hat der Aufsichtführende vor Arbeitsaufnahme unter Anseilschutz un ter anderem zu ergreifen? a) Die Anzahl der vor handenen Sicherheitsgeschirre sind zu erfassen b) Die Benutzer sind name ntlich zu erfassen c) Die Benutzer sind zu unterwei sen und die Anschlagpunkte sind vo rzugeben d) Es sind keine besonderen Maßnahmen zu ergreifen, da die Arbeit u nproblematisch ist für Führungskräfte der operativen Ebene

    You should get your expected OUTPUT text :

    N09-M06) Welche Maßnahme n hat der Aufsichtführende vor Arbeitsaufnahme unter Anseilschutz un ter anderem zu ergreifen? a) Die Anzahl der vor handenen Sicherheitsgeschirre sind zu erfassen b) Die Benutzer sind name ntlich zu erfassen c) Die Benutzer sind zu unterwei sen und die Anschlagpunkte sind vo rzugeben d) Es sind keine besonderen Maßnahmen zu ergreifen, da die Arbeit u nproblematisch ist für Führungskräfte der operativen Ebene

    Best regards

    guy038

  • Notepad++ change characters while open a file?

    5
    0 Votes
    5 Posts
    1k Views
    PeterJonesP

    @Arí-Ricardo-Ody said in Notepad++ change characters while open a file?:

    There is a cobol program on an IBM mainframe that requires the data it handles to have a hex x’0D’ after the last byte of each line.
    I’m just trying to prepare a text file in Notepad++ that will be transmitted to the mainframe.

    As @Alan-Kilborn said, that means your mainframe is expecting Macintosh-style line endings.

    In case you don’t understand line endings (most Windows users do not – though I would think anyone who was working on a Windows machine for an IBM mainframe would), there are three common sets of bytes that refer to the end of a line for text/source-code files:

    Unix/Linux: uses a line feed (ASCII 10, aka x’0A’ in your hex-based nomenclature, aka LF) Old Macintosh (and apparently IBM mainframe cobol compilers): uses a carriage return (ASCII 13, aka x’0D’, aka CR) Windows: uses a carriage return followed by a linefeed (ASCII 13 then ASCII 10, aka x’0D’ x’0A’, aka CRLF)

    Notepad++ defaults to using Windows line endings… unless you are opening a file that already has a Linux or Mac style line ending consistently used throughout, in which case it will auto-detect the right ending.

    So this means you are creating a new file from scratch, and thus it defaulted to Windows CRLF endings. Use the method Alan showed (or right clicking on the “Windows (CRLF)” on the lower-right of the Notepad++ status bar) to change the line endings.
    f268559d-77b7-4293-80ee-55a4016969bc-image.png

    Also, if you are using FTP to get the cobol source code from the Windows PC to your mainframe, you will have to pay attention to ASCII vs BINARY transfer mode: BINARY will transmit the bytes as-is; ASCII will convert CRLF on your PC to the native line-ending format of the destination machine, and vice versa, as long as the FTP server on the other end is configured correctly. Make sure you understand how your FTP client (or whatever file-transfer protocol you use: rcp, sftp, ftps, going across a SAMBA server, or whatever) deals with line endings, because no matter how careful you are in your text editor, if your transfer protocol changes things, you will get more confused.

    I didn’t understand your censure when you say that I’m doing it wrong, without knowing the reason why I’m doing it.

    His censure was because you were going about it wrong. (And more over, his actual phrasing was “don’t do what you are attempting… unless you can provide sound reason for doing so”. There was a sound reason for wanting x’0D’ as the line ending (because your IBM mainframe Cobol compiler wants that line ending)… but you were just going about the process in the wrong way when trying to get a necessary line ending (or at least, what you described yourself as doing was wrong; I cannot know whether you were actually doing it right and just didn’t describe it correctly).

    To clarify why the way you described is the wrong way: just arbitrarily adding the x’0D` byte to the end of lines that already have x’0D’ x’0A’ as the line ending won’t do what you want… because then the bytes will be either x’0D’ x’0D’ x’0A’ or x’0D’ x’0A’ x’0D’ (depending on where on the “end” of the line you added the x’0D’), which will not be what your compiler would want. The way you described things, you were fighting against the way that both KEDIT and Notepad++ deal with line endings, and hoping it would come out right, rather than understanding line endings and the tools you were using to get them to natively use the right line endings.

    So your end goal was reasonable. And Alan and I have now explained how to make Notepad++ give you your end-goal in the correct manner.

  • mark a line using a single button with macro or any feature.

    3
    0 Votes
    3 Posts
    335 Views
    PeterJonesP

    @Shekhar said in mark a line using a single button with macro or any feature.:

    highlight a line by pressing a single key or by highlight a line by using a macro function.

    By “highlight”, I assume you mean “select”, like what is accomplished by triple-clicking a line. Unfortunately, triple-click is not macro-recordable, and there is no single “scintilla command” that you can assign a shortcut to (that I am aware of).

    However, using Scintilla command IDs, you can craft your own macro:

    Edit %AppData%\Notepad++\shortcuts.xml * * Insert the following into the <Macros> section <Macro name="HomeShiftEnd" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="0" message="2312" wParam="0" lParam="0" sParam="" /> <Action type="0" message="2315" wParam="0" lParam="0" sParam="" /> </Macro> Save. Restart Notepad++

    Now you have a macro called “HomeShiftEnd” which will do what i think you want. You can assign a keyboard shortcut to that, just like any macro.

  • PythonScript detect saved/unsaved file state at startup

    7
    0 Votes
    7 Posts
    397 Views
    Alan KilbornA

    Another “wild” idea is to read the N++ “backup” folder for files present there.

    Example: If these files are there:

    change.log@2022-12-28_064818 new 2@2022-12-26_075922

    One can infer that the change.log and new 2 filetabs have unsaved changes.

  • Updating to V8.4.7, lost all my previous tabs

    3
    0 Votes
    3 Posts
    177 Views
    Bob KinzettB

    @PeterJones Thanks Peter… gives me some direction to work with

  • How to set "Find" Background colour?

    32
    0 Votes
    32 Posts
    9k Views
    Lycan ThropeL

    @Angga-Setia-Budi ,

    Mind you, your question doesn’t really apply to this thread’s discussion, however to move you along, here’s the steps needed. Go to the menu bar Preferences->Style Configurator->Language: Global Styles and then Style: Default Style. You’ll then see the two color selectable boxes to the right in the Colour Style Section of the Dialog box. You can set the colors there for whatever you want for the non-focusing line colors, and then go down to Style: Current line background and again, look to the right to see the color selection boxes to choose the colors from there. Now mind you, if it’s a predefined language you’re using, that will change the colors for all the language.
    See Below:
    StyleConfiguratorSelection.PNG

  • "Remove Unnecessary Blank and EOL" ?

    10
    0 Votes
    10 Posts
    2k Views
    Alan KilbornA

    @donho said in “Remove Unnecessary Blank and EOL” ?:

    I agree it’s named very badly. Do we have a better naming? Any suggestion?

    Not a great one. But see HERE.

  • N++ x,y pixel locations for cursor!

    3
    0 Votes
    3 Posts
    245 Views
    Alan KilbornA

    I don’t know much about AHK, but there’s some info that might interest you HERE.

  • Text selection color is gone since a few updates

    3
    0 Votes
    3 Posts
    281 Views
    cubedjC

    Correction - the plugin works fine only the settings file got probably corrupted by the NPP update… delete just the file “ExtSettings.ini” in “%appdata%\Notepad++\plugins\Config” … that should be enough to fix it ;)

  • "Display line number" feature disappeared

    4
    0 Votes
    4 Posts
    280 Views
    Alan KilbornA

    07af32b5-a997-4516-9178-fd5a992b5c33-image.png