• Pluggin. How readding crurent document Line per Line

    2
    0 Votes
    2 Posts
    195 Views
    CoisesC

    In what language are you writing your plugin?

    What do you have so far?

    The functions you will need are described here and you will probably need at least some of the functions described here. But from your message, I suspect you are not that far along yet.

    Start here and tell us when/where you get stuck.

    If you read that and your reaction is that it sounds far too complicated, it could be that you want to write a script, not a plugin. If you know Python, check out the Python Script plugin for Notepad++.

  • Incorrect color to property css rotate

    2
    0 Votes
    2 Posts
    253 Views
    Mark OlsonM

    @Yamir-Smith
    You can go to the langs.xml file in your application data directory (which is usually AppData/Roaming/Notepad++ but may also be the same directory where your notepad++.exe file lives), navigate down to Keywords name="instre1" element inside the Language name="css" element, and add the word rotate where it belongs in alphabetical order in the long list of keywords there (for me, it has to be between right and rotation).

    If you’re interested, you can open a PR so that this change can be incorporated into Notepad++ permanently. While you’re at it, you can see if there are other CSS keywords that are missing and add those as well.

  • Ctrl+Alt+S Save As... stopped working

    11
    0 Votes
    11 Posts
    2k Views
    M

    I unfortunately don’t have the permissions to run hotkey-detective on this system.

    I’m just going to settle for using Ctrl+Shift+S for Save As…

    Thanks everyone for help!

  • Interactive debugging scripts using PythonScript plugin

    3
    0 Votes
    3 Posts
    699 Views
    Stefano OrlandoS

    @Mark-Olson I already knew that I could use print and other passive mechanisms like logging. I tried with pdb and the script seems to get on break, an error message missing stdin is displayed on the console but I can’t find a way to enter commands for pdb

  • How to ignore certain characters in searches

    3
    1 Votes
    3 Posts
    1k Views
    Amanda HamiltonA

    @PeterJones ,

    Thank you very much! That does indeed work. I have also heard back from the CLAN developer, who suggests I could use a CLAN program to generate long tiers–but it does make things very hard to read in CLAN. Your solution is probably better. Thank you!!

  • How to run it with Google Web pages

    8
    0 Votes
    8 Posts
    1k Views
    최민정

    @mkupper

    Thanks a lot.

  • 0 Votes
    3 Posts
    498 Views
    Talbot TeboeT

    @Talbot-Teboe
    Sorry I didn’t realize that I needed to include lines without the /001
    In my attempt to create the expression I was not even close. I didn’t even get the last group of the expression correct
    I’d been manually searching for the lines without the /001, and had been at it for 3 hours before contacting the Community.
    Thank you very much for the assistance

  • @admin. how to fix "you need 1 reputation to post links" message

    4
    1 Votes
    4 Posts
    365 Views
    PeterJonesP

    @A-Notepad-User said in @admin. how to fix "you need 1 reputation to post links" message:

    i have same problem.

    No you don’t. You just clicked “quote” to reply, and it posted successfully.

    The issue described above (that the forum wouldn’t let you “quote” a reply if you have 0 reputation, because the @-mention and link-to-previous-post) was fixed when we upgraded forum software a few months ago. It is obviously fixed and working for you, because your post includes both the @-mention and the link-to-previous-post.

    If you have 0 reputation, you are still not able to link to external sites, to prevent spambots and other manual spammers. But other than that, 0 reputation can still post and reply without difficulty.

  • How can i get that grouping

    2
    0 Votes
    2 Posts
    412 Views
    Terry RT

    @Matiasoskari said in How can i get that grouping:

    i wonder how can i get grouping like that?

    It’s called folding. The online manual reference is here.

    It primarily works with “defined” programming languages (lexer file contains the necessary definitions to aid the folding). However you (the user) could also create a UDL. So in order that you can use folding in your file there would need to be a structure to the file contents, such as headings, paragraph start ID’s and the likes.
    Have a read of the process in the online manual’s link and see if it might work for you. The UDL system isn’t as mature as the lexer folding is, and you might encounter an issue creating your UDL. Be aware that others have also found bugs in the UDL system, but in spite of these being raised with the developer none have been fixed (as yet), reference.

    Other posts here with relevance.
    https://community.notepad-plus-plus.org/topic/25543/i-want-to-fold-in-text-files
    https://community.notepad-plus-plus.org/topic/25389/add-folding-rules-to-an-existing-language/3
    Use the text folding in the search window to find other posts which might have some relevance to your post.

    Terry

  • UDL 3 different colors for 3 similar delimiters

    3
    0 Votes
    3 Posts
    382 Views
    J

    @Mark-Olson , you solved it and it works great.

    It did not occur to me that the order would matter.

    Thanks for sharing your cleverness!

  • Problem in CSS alignment in same line . css not working

    Locked
    4
    0 Votes
    4 Posts
    718 Views
    Alan KilbornA

    @Zain-Khan

    The original query was a non Notepad++ related question.
    Please don’t answer those type of questions, it only encourages people to ask any kind of question here, when we want to focus on Notepad++ discussion.

  • Search for inconsistent line endings with a regex? (part 2)

    29
    3 Votes
    29 Posts
    7k Views
    guy038G

    Hello, @ekopalypse, @alan-kilborn and All,

    I did some additional tests, with your modifications, Alan :

    line_of_first_mismatch = editor.lineFromPosition(match.span(0)[0]) notepad.messageBox('Different EOLS detected -- the first inconsistency is on line ' + str(line_of_first_mismatch + 1),'EOL Mismatch', 0)

    and my own one :

    false_EOL = {0:'$\n|\r^', # Find \n AFTER end of line OR \r BEFORE beginning of line as editor.getEOLMode() = 0 ( Windows EOL )

    And everything seems to work as expected !

    So the final version of this script is :

    check = True false_EOL = {0:'$\n|\r^', # Find \n AFTER end of line OR \r BEFORE beginning of line as editor.getEOLMode() = 0 ( Windows EOL ) 1:'\n', # Find \n ( should be \r ) as editor.getEOLMode() = 1 ( Macintosh EOL ) 2:'\r', # Find \r ( should be \n ) as editor.getEOLMode() = 2 ( Unix EOL ) } def check_eol(match): global check check = False line_of_first_mismatch = editor.lineFromPosition(match.span(0)[0]) notepad.messageBox('Different EOLS detected -- the first inconsistency is on line ' + str(line_of_first_mismatch + 1),'EOL Mismatch', 0) user_input = notepad.prompt('Convert ALL line-endings of CURRENT file ( 0 for CRLF, 1 for CR, 2 for LF )', 'INCONSISTENT line-endings DETECTED !', editor.getEOLMode()) if user_input is not None: desired_eol_index = int(user_input) if 0 <= desired_eol_index <= 2: eol_cmd_list = [ MENUCOMMAND.FORMAT_TODOS, MENUCOMMAND.FORMAT_TOMAC, MENUCOMMAND.FORMAT_TOUNIX, ] if desired_eol_index == editor.getEOLMode(): notepad.menuCommand(eol_cmd_list[(desired_eol_index + 1) % 3]) # change to UNDESIRED line-endings notepad.menuCommand(eol_cmd_list[desired_eol_index]) # change to DESIRED line-endings editor.research(false_EOL[editor.getEOLMode()], # regex to search for check_eol, # function to call if regex match 0, # re flags 0, # START of file editor.getLength(), # END of file 1) # count ( at FIRST match ) if check == True: notepad.messageBox('All EOLS correct','EOL check', 0)

    To be rigorous, note that the first EOL inconsistency is always the first line with line-ending chars(s) different from the status bar indication !

    Best Regards,

    guy038

  • Macro Menu commands and the Context Menu

    7
    1 Votes
    7 Posts
    758 Views
    Alan KilbornA

    @Jim-Dailey said in Macro Menu commands and the Context Menu:

    And, as you have pointed out, even if they are on the Macro Menu, the context menu doesn’t “see” them there, but rather on the NPP Exec Menu.

    It’s a bit odd, because when they are configured to be on the Macro menu, they don’t appear on the NppExec plugin menu, so I’m not sure how they’re actually found. Curious.

  • f5 run...go to next line or next character?

    5
    0 Votes
    5 Posts
    594 Views
    ddalthorpD

    @PeterJones Almost certainly true. Thanks. npptoR has not been updated since 2016.

  • Header plugin

    4
    0 Votes
    4 Posts
    708 Views
    Aleksandr ShchepkinA

    Friends, you’ve helped me so much, I’m so happy. I have a txt file with more than 16000 lines, size 1,6 mb. I created an xml file in the functionList folder with the following code:
    <NotepadPlus>
    <functionList>
    <parser displayName=“XML” id=“xml”>
    <function
    mainExpr=“#([^#<]+)”
    displayMode=“$functionName”>
    </function>
    </parser>
    </functionList>
    </NotepadPlus>

    And indeed now, I have a set of headers displayed on the right (the headers start with the # symbol).
    The file is constantly growing, so far everything is working very well, thanks.

  • I can't save it... help me plz...

    2
    0 Votes
    2 Posts
    234 Views
    PeterJonesP

    @parkyungmin ,

    Sorry. I could not reproduce it. “Save” and “Save As” work for me.

    ----

    Why such a short reply? Because you didn’t tell us enough to be able to reproduce your problem, or because I tried what you described and got the results I expected. If you give us more information, we might be able to help more. Especially important are the ? menu’s Debug Info contents, a thorough description of the steps necessary to reproduce your problem.

  • Forced font antialiasing and Courier is not what it should be

    8
    0 Votes
    8 Posts
    732 Views
    Jean-Claude ArbautJ

    @Alan-Kilborn

    Actually, as long as the option is still there it’s fine. But it was surprising, as there is also an antialiasing option in the Editing pane, so I didn’t expect another option to cover this (and I rarely look at the Misc pane anyway).

    I guess whatever the enhancement, there will always be someone who doesn’t like it. ;-) I have myopia, and I see blurry enough, so I like my screen characters to be as sharp as possible. While it may not be a common concern, I’m sure I have seen folks with the same preference on the Internet from time to time, as my antialiasing problem is not new nor limited to Npp - Windows and other programs have not always been reliable for this either. Even on Linux, I tend to prefer xterm over the more modern terminals for the same reason. I’m in the anti-antialiasing team!

    Many thanks to all,

    JCA

  • Why does this regexp fail to match?

    8
    0 Votes
    8 Posts
    442 Views
    mkupperM

    @Alan-Kilborn said in Why does this regexp fail to match?:

    It’s so contrived it makes my head hurt. :-P
    I suspect this is the non-contrived version (which feels much better):

    I agree on the hurt, or at least spinning, head. In hindsight, I should have used ^date\K time which both works and is easier to mentally parse.

    I now understand why my first expression failed in the original message on this thread.

    FWIW, while parsing @Coises’ reply I found https://www.regular-expressions.info/lookaround.html via Google that has a decent explanation on why many regexp engines require fixed length or width lookbehinds. Some engines have ways around this restriction but each of those seems to create their own cans of worms.

    For now I’ll stick with lookbehinds only as the first thing in an expression or use \K as I now see that if I have a lookbehind later in an expression, even after a zero length ^ match, that it can be a brain twister to figure out what is happening.

    Here’s a simplified version of the contrived data and regexp that is easier to understand. The data is

    abc

    Searching using any of these get you the same results:

    (?<=a)bc b(?<=ab)c bc(?<=abc)

    The latter two end up inspecting the b or bc in the data twice.

  • 0 Votes
    4 Posts
    811 Views
    Gary HessG

    Sorry, I figured it out. “Wrap around” wasn’t checked.

  • After using Compare, how do you save differences?

    3
    0 Votes
    3 Posts
    7k Views
    Jacqueline van der WalJ

    @pnedev Thank you very much, I will try this! This is my work laptop on which I don’t have admin rights, so I will need to have someone install this for me. Thanks a lot!