• Markdeep files won't render properly

    4
    0 Votes
    4 Posts
    277 Views
    Lycan ThropeL

    @Alan-Kilborn

    @Alan-Kilborn said in Markdeep files won't render properly:

    why not just use View menu > View Current File in > Edge ?

    Yikes, I didn’t realize it was already included :-) My bad.

  • notepad++ 8.5 url for install/update plugins

    6
    0 Votes
    6 Posts
    1k Views
    Paul LeoP

    @Alan-Kilborn
    Makes total sense, thanks again

  • Today's date instead of YYYYMMDD

    5
    0 Votes
    5 Posts
    459 Views
    Alan KilbornA

    Anyway, here’s a demo script that could accomplish the goal. I call it ReplaceYyyymmddOnFileOpen.py:

    # -*- coding: utf-8 -*- # references: # https://community.notepad-plus-plus.org/topic/24257 #------------------------------------------------------------------------------- from Npp import * import time #------------------------------------------------------------------------------- class RYOFO(object): def __init__(self): notepad.callback(self.fileopened_callback, [NOTIFICATION.FILEOPENED]) notepad.callback(self.bufferactivated_callback, [NOTIFICATION.BUFFERACTIVATED]) self.process_next_buf_act = False def fileopened_callback(self, args): self.process_next_buf_act = True def bufferactivated_callback(self, args): if self.process_next_buf_act: editor.replace('YYYYMMDD', time.strftime('%Y%m%d', time.localtime())) self.process_next_buf_act = False #------------------------------------------------------------------------------- try: ryofo except NameError: ryofo = RYOFO()
  • no Folder as Workspace

    3
    0 Votes
    3 Posts
    185 Views
    Alan KilbornA

    Ah, some good memories of the old Crutchfield catalog from my teenaged youth. This was pre-internet and I’d wear the catalog out, turning the pages and dreaming of the stereo I’d love to have…

    (But yes, Terry, you make some excellent points with your reply!)

  • -1 Votes
    6 Posts
    436 Views
    Alan KilbornA

    Actually if you use N++ 8.5 or later, going where @datatraveller1 suggests will show you this:

    72b2fe19-9393-438d-af92-8cb376c01f37-image.png

    Number 3 is a new command to Notepad++ 8.5; see the Edit menu:

    b9bcc9f2-067e-44b2-8606-9c23dc137cac-image.png

    Personal note: I actually added this to N++ 8.5 – my FIRST contribution to Notepad++ code! :-)

  • Bug found in np++ 8.5

    3
    0 Votes
    3 Posts
    200 Views
    Taddeus TentakelT

    Funny, i was just about to say i found it xD sry it always worked automatically with enter so i assumed it was a bug, my bad!

  • Ctrl + L/R Arrow Keys... "distance" modification?

    8
    0 Votes
    8 Posts
    1k Views
    Alan KilbornA

    @guy038

    I tried the “word character list” thing before you posted about it. I found that adding [] to it still doesn’t make N++ work like other windows applications in regards to Ctrl+left/right, so I don’t think that will satisfy the OP.

  • TAB OUT OF CONTROL

    4
    0 Votes
    4 Posts
    345 Views
    Alan KilbornA

    @Garry-Petrie said in TAB OUT OF CONTROL:

    All I wanted to do is use word wrap and intent the first line with a tab character, you know, like normal writing and typing. Once tab is invoked, it repeats on every subsequent line. BAD, BAD, BAD.

    Couldn’t you not whine, and just ask a civilized question, like “How do I do this?”

    You obtained this:

    f6eed6f6-fec9-4549-8425-232fc62e3a2f-image.png

    And to get what you wanted all you had to do was select this:

    314072dc-ba95-43fd-9810-c034cd172ca3-image.png

    But you’re long gone now, back to Notepad.exe.
    Lucky you.

  • Erase content from duplicate lines, but keeping the first unchanged

    9
    2 Votes
    9 Posts
    346 Views
    guy038G

    Hello, @luís-gonçalves, @mark-olson, @alan-kilborn, @peterjones and All,

    Here is a quick way to mark all consecutive equal lines but the first !

    First, add a final line-break at the end of your number’s list ! ( IMPORTANT )

    MARK (?x) ^ ( \d+ \R ) \K ( \1 )+

    Bookmark line, Purge for each search and Regular expression checked

    Then, you can follow the @mark-olson’s instructions ! So :

    Put a single space char in the clipboard with Ctrl + C

    Run the Search > Bookmark > Paste to (Replace) Boomarked Lines option

    Finally, run the simple S/R :

    SEARCH ^\x20$

    REPLACE Leave EMPTY

    Or use the Edit > Blank Operations > Trim Trailing Space option

    Best Regards

    guy038

  • Custom Toolbar Icon - Custom Date Time Stamp: Mini-Tutorial

    12
    2 Votes
    12 Posts
    743 Views
    PeterJonesP

    @glimmerwell said in Custom Toolbar Icon - Custom Date Time Stamp: Mini-Tutorial:

    That is how I extracted the icon. But I am not using the Fluent toolbar. I just personally like the standard icons better.

    Then you have to use a bitmap.

    I still would like a bitmap version of the clock icon

    Microsoft Windows still comes with an application called mspaint.exe, even though it’s not their default for image editing anymore. You can open that application (WindowsKey + R => mspaint.exe, et voila, it appears), load the .ico file, and Save As a .bmp. Or you can find one of a plethora of app-based or online-based image converters which could convert the icon from .ico to .bmp for you.

  • "Invalid regular expression" error after crossing line ~3000000

    5
    0 Votes
    5 Posts
    499 Views
    PeterJonesP

    @Bahaa-Eddin-ツ said in “Invalid regular expression” error after crossing line ~3000000:

    Can you explain the thing you didn’t understand so I can edit the post

    His point was, because you didn’t use ` before and after your regex (to put it in a red typeface), the asterisk wildcards in your regex became italics in your post. It makes it very hard to know what regex you tried when you don’t even look at the “preview” or the post after you’ve hit SUBMIT, and notice that the regex that’s shown isn’t the regex that you tried.

    ----

    Useful References Please Read Before Posting Template for Search/Replace Questions Formatting Forum Posts Notepad++ Online User Manual: Searching/Regex FAQ: Where to find other regular expressions (regex) documentation
  • Wrong manipulation help

    3
    0 Votes
    3 Posts
    200 Views
    Clément BerguerandC

    @PeterJones said in Wrong manipulation help:

    @Clément-Berguerand ,
    By default, Notepad++ enables the Settings > Preferences > Backup option for session-snapshot-periodic-backup, which only keeps a temporary backup copy to keep unsaved changes, it’s not a true “backup”, and it goes away when you hit SAVE or CLOSE in Notepad++
    Notepad++ has an additional feature “backup on save” available in the same Preferences dialog, which will create filename.bak or similar every time you hit SAVE. But if you didn’t already have that option enabled, it won’t help you now, and there’s nothing that Notepad++ can do for you. If you did already have that option enabled, there should be a .bak file next to your saved game, or in the “custom backup directory” listed in the Preferences dialog. (Notepad++ doesn’t enable that option by default because when the developer tried, a plethora of users complained about too many .bak files being created that they didn’t want. I argued in favor of data safety, but don’t-create-.bak-files-by-default crowd won that argument.)
    For future data safety, I highly recommend reading our backup features and autosave plugin FAQ, and set things up to make it less likely that you will lose your data.
    If your data is lost, that FAQ does mention a potential piece of software (not officially recommended or endorsed, other than some users have had luck with that tool) that can help recover deleted files.
    Good luck.

    Thank you very much. I’ll try to do it.

  • How Np++ handles char count?

    8
    0 Votes
    8 Posts
    1k Views
    pintassilgoP

    Thanks for all the replies. Byte count looks good enough for me, there is already a dedicated plugin to more refined statistics like count chars and words, for statusbar I believe byte count is enough.

    However, the other editor I’m talking about (CudaText) doesn’t use Scintilla, it has its own editing component (ATSynEdit) that doesn’t use simple buffer storage to retrieve byte count, it has “list of lines” according to the dev so the count would be slow.

    An optimization is possible by caching the size of each line, adding them up and then updating with edit events (typing one char sums 1…). But at the moment he don’t plan to work on it because it’s not that trivial as the editor supports multiple carets, multiple selections ans so on.

    Just adding, other text editor I have installed here, Kate, displays not only chars count (precisely, not bytes) but also count of words in statusbar. However these counts aren’t instant, I can see they wait for like half a second without change in the text to update. Clearly it’s done this way because it’s not that cheap to be done instantly.

  • add characters

    4
    0 Votes
    4 Posts
    423 Views
    Mr SchnokM

    Hello @guy038

    Thank you very much. It works very well.
    And especially thank you for the explanation.

    Have a nice day.
    Phil

  • Installation does not wait for completion

    1
    0 Votes
    1 Posts
    113 Views
    No one has replied
  • How can i bulk change this

    5
    0 Votes
    5 Posts
    367 Views
    Michael VvM

    @PeterJones thanks man, you helped me a lot!

  • Replace html tag with regular expression

    2
    1 Votes
    2 Posts
    716 Views
    PeterJonesP

    @Linh-Việt ,

    So, you want to replace any <article-title> with <chapter-title>, but only when inside a <type="book"> .... </type> pair, and not between other types, like <type="journal">...</type>?

    That sounds like a job for FAQs > Generic Regex > Replacing in a specific zone of text , where you could use:

    Find Regex FR = article-title> Replacement Regex RR = chapter-title> Begin Search Region BSR = <type="book"> End Search Region ESR = </type>

    Using those values in the bold “variables” in the regex shown in that article, you would get:

    Find What = (?-si:<type="book">|(?!\A)\G)(?s-i:(?!</type>).)*?\K(?-si:article-title>) Replace With = chapter-title> Replace All will convert the text for you. (doing multiple Replace commands won’t necessarily work, because of the way that \K works)

    BTW: thanks for formatting your example data correctly. It helps us make sure we read your data correctly!

    ----

    Useful References Notepad++ Online User Manual: Searching/Regex FAQ: Where to find other regular expressions (regex) documentation
  • Plugin admin and compare plugin removed after update notepad++

    2
    0 Votes
    2 Posts
    1k Views
    PeterJonesP

    @Subhash-Sheladia ,

    You updated to a version that’s 1.5 years old? /me shudders to think how old your from version was.

    If you see a bug like Plugins Admin missing, a good idea is to try updating to the newest version (v8.5, released over the weekend) and see if the problem is fixed. If downloading the newest doesn’t work, please give us a recursive directory listing for c:\Program Files\Notepad++\ (using dir /s "c:\Program Files\Notepad++\" from a command prompt).

    But if you were really updating from a version that old, then the old Compare plugin you used to have would not be compatible with the modern Notepad++, so v8.1.1 may have disabled it. If you can successfully install v8.5 and see Plugins Admin again, then you will see that Plugins Admin lists both Compare 2.0.2 and ComparePlus 1.1 – ComparePlus is the replacement for Compare, and will work better on modern Notepad++ going forward, so I highly recommend installing that.

  • Data parser/import?

    24
    0 Votes
    24 Posts
    2k Views
    V.MelnikV

    @guy038
    Thank you again @guy038
    But I decided this at the stage of preparation of the “B” file, by replacing it

    . </p>

    on

    </p>
  • Python: Multiple files ANSI to utf-8 converter

    9
    0 Votes
    9 Posts
    3k Views
    PeterJonesP

    @Mark-Olson ,

    Note that this doesn’t use Notepad++ for anything,

    I appreciate your willingness to help. However, we need to focus this Forum on Notepad++. If it’s something that can be done in PythonScript, and you are interested in providing the solution, please make it compatible with PythonScript. This forum isn’t for “generic” Python code-writing.