• Setting up User Defined Language Comment Section - exclusion issue

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Chip CooperC

    Wow, so reread documentation again, and it appears that Don of Notepad++, worked with, or had developed a section to handle this exception. I’m seeing that making an interpreter like this is problematic. Kudos for UDL working on that, as I’m sure this wheel gets reinvented for every Language Plugin. So, it’s ironic that the section in UDL doesn’t support operators in the interpretation for forward/reverse logic in the comment section. Not that I know this would help here. In starting the UDL, I picked the comment section as the first part to start with, as it seemed to be the first win I could get, this exception really threw me… till I did what Don had to do for C/C++ that I had to do with .lua which is use the ‘delimiter’ section for the exception. “–” to open/(EOL) as a closer. Worked great, just wish it wasn’t needed, and comments keys could go into comment section.

    So, I ‘resolved’ this… if that’s what one could call it. At least it works now. :-) Can I pat myself on the back, or get admonished for posting a problem I solved simply by RTFM again! lol

    Thanks to those who at least poked in to see if they could help! I think this UDL has a lot of promise! Sure wish I could help; but man, I don’t want to pick up on C/C++ again, it’s been too long. Whereas I’ve had to become more flexible in my old age… I remember C/C++ as very strict, even if as I recall it was one of the most sophisticated ways to write Machine Code!

  • BUG: Language/Define Your Language Export doesn't save filename as Type

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Chip CooperC

    I’d like permission to post this as a Bug report for Notepad++ github as an Issue… I think it’s minor, now that I’m aware; but, a bug it is…

  • Collapse Issue

    3
    1 Votes
    3 Posts
    1k Views
    Chip CooperC

    I’ve seen this recently also… using .lua (built-in). Almost always it does line breaking correctly, but I’ve seen it a least twice now myself. I’ve also examined the code, but wasn’t sure what ‘might’ be causing it,so I was just looking for ‘something obvious?’ in the code, but… no, that wasn’t it. Whatever it is, it seems to be an exception that’s not being handled, as it is rare. I’ll try to remember to post the code next time, and bring it up, as mine was only about 10 to 15 lines… or so. It seems to me that anything in a comment should be ignored completely. Mine had comments, and they appeared to be ignored, no brackets though, except comment brackets --[[ ]]

  • Flickering in Notepad++

    Locked
    3
    0 Votes
    3 Posts
    4k Views
    Chip CooperC

    Regarding my last post, I’m presuming you’ve tried updating your Notepad++ version. Depending on the age of any app running in the background, it may be using old libraries, which could, though not interfere, be increasing the number of memory swaps needed to keep it running, increasing processing time, etc. One of the things I’ve done is to use MSConfig, to reduce background applications running in the system to free up memory, and temporarily reduce overhead. IOW only run what you need. Using that can by process of elimination determine what if anything might be causing the issue.

  • Replace function

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Dann TruongD

    @Claudia-Frank
    Thanks for the hint. regular expression is the key. It now works perfectly.

  • Please need help decode ai file

    3
    -1 Votes
    3 Posts
    1k Views
    Gogo NeatzaG

    @Myme 651 What is an “ai file” ? Where did you get it from ?

  • Fit Image to Table Cell

    4
    0 Votes
    4 Posts
    2k Views
    chcgC

    See https://sourceforge.net/projects/imgtag/files/, now version 2.0.1 is also available via the Plugin Manager DevList.

  • Why won't the title for my new page show up?

    Locked
    16
    0 Votes
    16 Posts
    6k Views
    David BielbyD

    So the short answer is that I didn’t understand where the title was supposed to show up and was looking in the URL rather than at the top of the tab in m browser. It was working correctly, I just expected a different result that it was supposed to give. Thank you for helping me Claudia!

  • Extracting email addresses

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    Claudia FrankC

    @Tim-Peek

    Sure it is a pdf file? pdf files are not supposed to be edited by notepad++.
    Anyway, if you have the file open and already stripped down to lines with email addresses only
    use find dialog and regular expression checked
    Find what:

    .*?(\w+@\w+\.\w+).*

    Replace with:

    \1

    Cheers
    Claudia

  • How to stop Notepad++ from formatting HTML files

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Claudia FrankC

    @Bernie-Elsner

    If I understand correctly, I assume that some installed plugin is responsible for this behavior.
    Could this be in your case? Did you install additional plugins?

    In general, if you want to switch off the language dependent actions temporarily, choose
    Normal text from language menu, do the needed action and reselect HTML from the
    language menu.

    Cheers
    Claudia

  • Notepad++ v1.0 source

    3
    0 Votes
    3 Posts
    2k Views
    Shakespeare WillianS

    @chcg
    Thank you.

  • whatever are the variables to use in user-defined shortcut ?

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Budi KusasiB

    Great favor ! Thanks so much God bless you… ameen

  • What is the procedure to get this software to be used officially?

    3
    0 Votes
    3 Posts
    1k Views
    Marco CzenM

    @Amogha-A-Rao - Just install the software / accept the license terms and you can use officially ! Nothing else required. There is no special licesing package or key etc.

  • how to know opening tag without scrolling

    3
    0 Votes
    3 Posts
    1k Views
    Marco CzenM

    @bonaca - Goto that html tag and hit Ctrl+T. That will take you to the closing tag. HTML Tag Plugin needs to be installed.

  • Need to uninstall 7.3.3 (32bit) but...

    Locked
    5
    0 Votes
    5 Posts
    3k Views
    Chip CooperC

    Yep, that did it. However, I had installed the original as a .bin and I probably have a bit of garbage in my registry. So, I did a little manual labor collecting garbage in the Dragon’s den. Wouldn’t surprise me if I left a couple pieces laying around; but, the Dragon probably won’t notice. ;-)
    So, after doing that, I’m now wrestling with whether I should leave a (x86) version on the machine while (x64) is still under development, perhaps not; although, it’s much further along than I expected with the x64 Plugin Manager, so woo hoo! The .lua plugin for (x64) is available too, so I couldn’t be happier… but I digress…
    Thanks a lot for your help… I appreciate it. Now, if I could only figure out how to remove those typo’s from my autocompletion dictionary, apparently lang.xml has chanced name, been upgraded or something as well… sure would be nice to have a clean editor for what ever it’s called, where-ever it’s stored… Now, if I could just find it, see how messy it looks, and perhaps how to make a plugin… I could do something about that. When it gets too irritating, maybe I’ll take a break from .lua and dig into the plugins for Notepad++ using Scintilla and learn about that! :-)
    Thanks again for your help!

  • 0 Votes
    2 Posts
    1k Views
    Scott SumnerS

    @Life’s-Hacks.

    Something like this could work:

    Find-what zone: (?-s)^.*?delete me.*\R.*\R
    Replace-with zone: make sure this is EMPTY
    Wrap-around checkbox: ticked
    Search-mode: Regular expression
    Action: Press Replace All button

  • C function exploration

    4
    1 Votes
    4 Posts
    2k Views
    Scott SumnerS

    @Telis-Tnilit

    So…not sure if the TagsView plug-in met your need, but I modified something I already had scripted (in Pythonscript) to do what you want , albeit in a basic way: The script needs to see the enclosing C function braces ( { and } ) in column 1, and when it does it takes the single line above the { as the function signature.

    So for a C function like this:

    void test2(void) { x = 1; if (1) { x = 2; } }

    when the caret is inside the function body, the status bar will show this:

    Imgur

    I call the script CFunctionShowInStatusBar.py :

    def CFSISB__callback_sci_UPDATEUI(args): def sb_print(x): if len(x) == 0: x = ' ' # writing '' to status bar does nothing, so change it! notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, x) if notepad.getCurrentFilename().lower().endswith('.c'): f = editor.findText(FINDOPTION.REGEXP, editor.getCurrentPos(), 0, '^[{}]') if f != None: (found_start_pos, found_end_pos) = f if '{' == editor.getTextRange(found_start_pos, found_end_pos): line_nbr = editor.lineFromPosition(found_start_pos) if line_nbr == 0: sb_print('not in function?') else: sb_print('in function: ' + editor.getLine(line_nbr - 1).rstrip()) else: sb_print('not in function') else: sb_print('not in function!') else: sb_print('') editor.callback(CFSISB__callback_sci_UPDATEUI, [SCINTILLANOTIFICATION.UPDATEUI])```
  • Replace all places of text that contain ips in brackets with nothing

    Locked
    10
    1 Votes
    10 Posts
    4k Views
    guy038G

    Hi, @patrick-tamm, @claudia-frank and @scott-sumner,

    Claudia, regarding your last regex, it would better to use a lazy quantifier, just in case of lines, as below :

    This is [an example] of text with [some pairs] of square brackets, in the [same line] !

    So a correct regex S/R should be :

    SEARCH : \[.*?\]

    REPLACE : []

    OPTIONS : Regular expression and Wrap around and, maybe, . matches newline if brackets pair are split on two different lines !

    ACTION : Click on the Replace All button

    Cheers,

    guy038

  • Show count of occurrences of a selected string

    Locked
    2
    0 Votes
    2 Posts
    5k Views
    Scott SumnerS

    @bob-bob

    You could do a plugin to get this behavior, or you could script it. Here’s an example (may not be fully rounded out) in Pythonscript, I call it SelectedTextCountIntoStatusBar.py; you would run it once per Notepad++ session:

    def callback_sci_UPDATEUI(args): if args['updated'] & UPDATE.SELECTION: matches = [] if editor.getTextLength() < 100000: # don't search "big" files if editor.getSelections() == 1 and not editor.getSelectionEmpty(): try: editor.research(r'\Q' + editor.getSelText() + r'\E', lambda m: matches.append(1)) except: matches = [] l = len(matches) notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, ' ' if l == 0 else '{} occurrence(s) of selected text'.format(l)) editor.callback(callback_sci_UPDATEUI, [SCINTILLANOTIFICATION.UPDATEUI])
  • 2 Votes
    32 Posts
    15k Views
    Marco CzenM

    @Scott-Sumner - Noted. Thanks.