• Two instances, dnd works to first, not to second?

    11
    0 Votes
    11 Posts
    755 Views
    Alan KilbornA

    @Ekopalypse

    Only changes by the instance which get closed last will be saved.

    Oh, yea. Knew that. Another reason to dislike M.I. :-)

  • Persistent highlight of characters (e.g. no-break space)

    14
    1 Votes
    14 Posts
    1k Views
    EkopalypseE

    @Alan-Kilborn

    I’m not sure what the code is you’re showing.

    It’s cythonized python code :)
    Basically this
    editor.callbackSync(self.on_updateui, [SCINTILLANOTIFICATION.UPDATEUI])
    is equivalent to

    cdef void beNotified(SCNotification *notifyCode): global notification if notifyCode.nmhdr.code == SCN_UPDATEUI: mark_spaces()

    With pythonscript on_updateui would handle the notifcation and
    here it is mark_spaces.

    mark_spces uses SendMessage method to do the communication with
    scintilla to show and proof that this message can be used to some
    certain of degree, so this can’t be the only reason. I assume it has to do
    with locking/releasing GIL and threads but I’m not going to dig deeper
    as I’m working on a replacement for PS - so from my point of view it doesn’t make sense to spent time on it. :)

  • auto complete\insert multiple html tags?

    9
    0 Votes
    9 Posts
    981 Views
    mzeshleM

    @mzeshle I solved the issue after looking at the error the Python Script plug-in console was showing. So to solve it, you can download the x64 from https://github.com/emmetio/npp/issues/19#issuecomment-383800041 then making sure to:

    Install the python script plug-in Copy everything (python scripts) in the Emmet folder except the .dll to the scripts folder of Python Script plug-in. Make sure to go to Settings>Shortcut Mapper to change the default Emmet shortcut something other than ctrl-alt-enter because this has conflict with another NPP shortcut

    It worked! thank you all guys!

  • Opening the same file in multiinstance

    2
    0 Votes
    2 Posts
    241 Views
    Alan KilbornA

    @gr-ch

    Sounds like a case of wanting too much. Multiple instances are fully independent and (future instances – where this would have to be detected) have no real (reasonable) way of knowing what files another instance has open.

  • Find and replace a variable item

    10
    0 Votes
    10 Posts
    5k Views
    PeterJonesP

    @Tazhar0001 said in Find and replace a variable item:

    Peter, is it possible to send you a private message of the .XML file I have? My knowledge in doing such a task is, minimal to say the least.

    There are no PM on this, and I don’t advertise my email address here (avoiding spambot harvesting).

    The [example data](https://community.notepad-plus-plus.org/post/50274 you showed near the start of this thread does work with the script I provided (well, I guess my previous post was missing the first line needed):

    from Npp import * def add_1(m): return (m.group(1)) + str(int(m.group(2)) + 1) + (m.group(3)) editor.rereplace('(lootmax=")([0-9]+)(")', add_1);

    Even with data like:

    lootmax="2" lootmax="4" lootmax="6" lootmax="1" lootmax="5" lootmax="9" <tag other="x" lootmax="2" /> <tag other="y" lootmax="4" /> <tag other="z" lootmax="6" /> <other>blah</interferes> <tag other="p" lootmax="1" /> <tag other="d" lootmax="5" /> <tag other="z" lootmax="9" />

    all the lootmax="#" get one added properly.

    If you need help with PythonScript

    Install PythonScript (if you don’t already have it): Plugins > Plugins Admin, check the box on ☐ PythonScript, and click Install; restart Notepad++ as needed Plugins > PythonScript > New script, named lootmax.py Paste the contents of the script from this post. Save. Set Notepad++'s active file to your file with the lootmax values. Run **Plugins > Python Script > Scripts > lootmax`; the replacement should occur.
  • 0 Votes
    5 Posts
    1k Views
    Mark HarneyM

    @PeterJones said in How to remove all lines before a string value including the line with a string:

    (?s).(?-s)^Content-Type: message/rfc822.\R{2}

    I had just tried with rfc822 and it did not work, but I have tried again with the string you gave me and it works. I really appreciate your help!

    Mark

  • How to create abbreviations for java code

    29
    0 Votes
    29 Posts
    4k Views
    guy038G

    Hi, @michael-vincent, @peterjones and All,

    As you suggested, @michael-vincent, I removed the space char between the # symbol and the string LANGUAGE_NAME. But, after saving and restarting N++, the pseudo abbreviation tags #LANGUAGE_NAME=.... still appear in dialog, when choosing the Plugins > QucikText > Options... !?

    Luckily, it does not interfere with the abbreviation tags management of the last version 0.1.2.4 of the QuickText plugin, which remains correct ;-))

    Cheers,

    guy038

    P.S. :

    Actually, I just did an additional test, changing any line #LANGUAGE_NAME=.... into lines LANGUAGE_NAME=.... and, this time, these lines are not displayed in the Options dialog ;-))

  • 1 Votes
    1 Posts
    210 Views
    No one has replied
  • 0 Votes
    4 Posts
    512 Views
    Alan KilbornA

    This situation could also result from the use of the EditorConfig plugin, depending upon how it is configured with the .editorconfig files. Just sayin.

  • Notepad++ running as a service in windows 2012 R2?

    3
    0 Votes
    3 Posts
    371 Views
    ?

    Thanks a lot for your advice!

  • Replacing buttons with images

    2
    0 Votes
    2 Posts
    273 Views
    Alan KilbornA

    @Paulo-Martins

    This should get you started…click HERE.

  • One line per 1000 items in a macro?

    17
    2 Votes
    17 Posts
    2k Views
    sepodeleS

    Great stuff guys. It works like a charm! Thank you! :-)

  • 0 Votes
    5 Posts
    6k Views
    CletosC

    Thank you, andrecool-68,

    Works great.

    Hello guy038,

    That option does it very good as well, thank you. Thanks Alan.

  • Where to find HexEditor.dllfor 64 bits W10 ?

    2
    0 Votes
    2 Posts
    275 Views
    PeterJonesP

    Since HexEditor hadn’t been officially updated since 2009, @chcg has made an unofficial 64-bit port of HexEditor available at https://github.com/chcg/NPP_HexEdit/releases, with a couple of bugfix releases. The most recent x64 zipfile is the one you’ll want.

    For a normal Notepad++ installation, unzip HexEditor.dll into c:\Program Files\Notepad++\Plugins\HexEditor\HexEditor.dll, then reload Notepad++.

  • Remove Keywords python language

    4
    0 Votes
    4 Posts
    375 Views
    Siebe AlbersS

    @PeterJones Thank you! You helped me a lot with this.

  • How to add only one space at end of each line ?

    6
    0 Votes
    6 Posts
    6k Views
    Alan KilbornA

    @mahesh-ageer

    You didn’t say anything about lines that already had some amount of spaces at their ends. Try to be complete with your problem description.

    I might be inclined to do that all in one step by searching for \x20*$ and replacing that with a single space.

  • Replace data on specific position by data from 2nd file

    7
    0 Votes
    7 Posts
    1k Views
    Petr KurdiovskýP

    Hi all, I found solution!
    1.Add 10 spaces at end of each lines in file X.REN by command $
    2.Copy rectangular selection 10 x number of lines in file X.REN
    3.Mark rectangular selection 10 x number of lines on target file in requested position and paste it.

  • dont know

    2
    0 Votes
    2 Posts
    219 Views
    Alan KilbornA

    @bot-rip

    This should get you started…click HERE.

  • Mass replace inside file at once

    6
    0 Votes
    6 Posts
    2k Views
    Alan KilbornA

    @PeterJones said in Mass replace inside file at once:

    merge them manually in shortcuts.xml

    For you, yes, but for a casual Notepad++ user, maybe not.
    I was just pointing out that a bit of serious concentration when recording macros will go a long way in helping out. :-)

  • Replace every URL with the URL + text

    8
    0 Votes
    8 Posts
    955 Views
    jcg3675J

    Glad to hear that it works! You don’t owe me anything. Just pay it forward to someone else when the time comes :)