• Replace all spaces with a dash (-) but with a certain limit !

    9
    0 Votes
    9 Posts
    1k Views
    Antoine GautierA

    this lesson is well understood :)

    I’m an amateur in website creation, and I have several pages under different names, that I have to put dashes (-) instead of Space and at the end of each line before the / I’ll add extension .html and the rest after (/) is the title of each page.

  • 0 Votes
    2 Posts
    244 Views
    Alan KilbornA

    @Don-Patton

    Maybe try a file compare on the original file and the file after alteration with Notepad++? It seems like something unintended is getting changed (I guess that is a fairly obvious statement).

  • [BUMP] Previous installation not detected?

    10
    0 Votes
    10 Posts
    621 Views
    Alan KilbornA

    @TBugReporter

    if I use fifteen programs by Compatublo, eight by DidgeryDot, and twelve from NaNsoft…

    I’ll bet that you don’t. :-)

    when the fix might only require a three line code change

    People that make these kinds of statements, and we seem to see them a lot here, just show they don’t know what they are talking about.

    create an issue on the GitHub…done

    And well done at that.

    devs should also be allowed to decide for themselves

    They surely do. Those people are golden, and in general, underappreciated. Three cheers.

  • Find text and replace at the top of file

    10
    0 Votes
    10 Posts
    421 Views
    Srirup DasS

    Thanks @Alan-Kilborn and @guy038 . Both of them worked what I was looking for. I’m still new to regular expressions, but I will try to dig in more on both of your solutions.

  • "Open all" from Search result window takes a LOOONG time?

    11
    2 Votes
    11 Posts
    451 Views
    guy038G

    Hi, @alan-kilborn, @ekopalypse and all,

    Alan, I gave it a try to verify the behavior of my very old and weak XP SP3 system, on my old NEC M350 laptop ;-))

    Some time ago , for various tests, I downloaded the N++ source files, so the two folders PowerEditor and scintilla in a new folder, named Sources. With my last installed N++ release ( v7.8.3 ) I ran the following Files in Files search

    Search "(?-s)the.*not" (167 hits in 45 files) D:\@@\770\Sources\PowerEditor\bin\license.txt (18 hits) D:\@@\770\Sources\PowerEditor\bin\readme.txt (1 hit) D:\@@\770\Sources\PowerEditor\src\MISC\Common\Common.h (1 hit) D:\@@\770\Sources\PowerEditor\src\MISC\Common\mutex.h (4 hits) D:\@@\770\Sources\PowerEditor\src\MISC\Common\Sorters.h (2 hits) D:\@@\770\Sources\PowerEditor\src\MISC\Common\verifySignedfile.h (1 hit) D:\@@\770\Sources\PowerEditor\src\MISC\PluginsManager\Notepad_plus_msgs.h (7 hits) D:\@@\770\Sources\PowerEditor\src\TinyXml\tinyxml.h (15 hits) D:\@@\770\Sources\PowerEditor\src\TinyXml\tinyXmlA\tinyxmlA.h (15 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\CharDistribution.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\JpCntx.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsBig5Prober.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsCharSetProber.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsCodingStateMachine.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nscore.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsEscCharsetProber.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsEUCJPProber.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsEUCKRProber.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsEUCTWProber.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsGB2312Prober.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsHebrewProber.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsLatin1Prober.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsMBCSGroupProber.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsPkgInt.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsSBCharSetProber.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsSBCSGroupProber.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsSJISProber.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsUniversalDetector.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\nsUTF8Prober.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\prmem.h (4 hits) D:\@@\770\Sources\PowerEditor\src\uchardet\uchardet.h (4 hits) D:\@@\770\Sources\PowerEditor\src\Utf8.h (1 hit) D:\@@\770\Sources\PowerEditor\src\Utf8_16.h (1 hit) D:\@@\770\Sources\PowerEditor\src\WinControls\PluginsAdmin\pluginsAdmin.h (1 hit) D:\@@\770\Sources\PowerEditor\src\WinControls\shortcut\shortcut.h (1 hit) D:\@@\770\Sources\scintilla\cocoa\PlatCocoa.h (1 hit) D:\@@\770\Sources\scintilla\cocoa\ScintillaView.h (1 hit) D:\@@\770\Sources\scintilla\doc\Lexer.txt (1 hit) D:\@@\770\Sources\scintilla\include\Platform.h (2 hits) D:\@@\770\Sources\scintilla\License.txt (1 hit) D:\@@\770\Sources\scintilla\src\AutoComplete.h (1 hit) D:\@@\770\Sources\scintilla\src\CaseConvert.h (1 hit) D:\@@\770\Sources\scintilla\src\Document.h (1 hit) D:\@@\770\Sources\scintilla\src\Style.h (1 hit) D:\@@\770\Sources\scintilla\src\ViewStyle.h (1 hit)

    Presently, my current session already contained 36 opened files, in various folders

    The search directory was D:\@@\770\Sources and the filters zone contained *.txt *.h. All the search was done in 1,9 s

    Note that the total size, of these 45 files, is not very important : 336,206 bytes

    The opening, within N++, of these 45 files, with the Open All option, took 3,09 s Then, I just have to use 45 times the Ctrl + W shortcut to get rid of all these additional test files ;-))

    May be, you could open the Windows Event Manager ( eventvwr.msc ), choose System, then the menu option View > Filter.... Now, tick Error events only and valid. You may also choose disk in the event source list, for an additional filtering ?

    Best Regards,

    guy038

  • Make ctrl-shift-tab move like ctrl-tab

    6
    1 Votes
    6 Posts
    563 Views
    Alan KilbornA

    @VTGroupGitHub said in Make ctrl-shift-tab move like ctrl-tab:

    In case anyone needs this in the future, choose “Settings” / “Shortcut Mapper”

    Your description is specific to what you’ve configured, but in general, that’s how you’d remap anything, so really, you’ve created a general description of how to use Shortcut Mapper. :-)

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

    11
    0 Votes
    11 Posts
    508 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
    934 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
    777 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
    182 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
    171 Views
    No one has replied
  • 0 Votes
    4 Posts
    446 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
    311 Views
    ?

    Thanks a lot for your advice!

  • Replacing buttons with images

    2
    0 Votes
    2 Posts
    215 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
    4k 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
    230 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++.