• XML tools > Pretty files in a folder

    6
    0 Votes
    6 Posts
    1k Views
    dinkumoilD

    @PeterJones

    Sorry for my late response, but I visit the forum only occasionally.

    It seems like you felt my last comment was in some kind offending, rude or at least harsh. If this is true I beg you pardon, it was not my intention to be like that. Maybe it seems so because English is not my mother tongue and I was not able to find an appropriate wording when I quickly fired off my comment.

    And of course no one can know every single detail of all plugins, even if they use them themselves.

  • Bookmark by style

    11
    1 Votes
    11 Posts
    3k Views
    Alan KilbornA

    The marker ID used for bookmarks changed in Notepad++ 8.4.6 (and later). It is now 20, instead of 24. So, all references to 24 in this thread and/or its script(s), should be changed to 20.

  • Bookmark Scrollbar display

    13
    2 Votes
    13 Posts
    6k Views
    Alan KilbornA

    The marker ID used for bookmarks changed in Notepad++ 8.4.6 (and later). It is now 20, instead of 24. So, all references to 24 in this thread and/or its script(s), should be changed to 20.

  • All bookmarks list view

    20
    2 Votes
    20 Posts
    5k Views
    Alan KilbornA

    The marker ID used for bookmarks changed in Notepad++ 8.4.6 (and later). It is now 20, instead of 24. So, all references to 24 in this thread and/or its script(s), should be changed to 20.

  • How to mark lines above marked lines

    14
    0 Votes
    14 Posts
    19k Views
    Alan KilbornA

    The marker ID used for bookmarks changed in Notepad++ 8.4.6 (and later). It is now 20, instead of 24. So, all references to 24 in this thread and/or its script(s), should be changed to 20.

  • New setting to adjust font sizes ?

    9
    0 Votes
    9 Posts
    372 Views
    Ian TurnerI

    @Alan-Kilborn No problems, I am just grateful that you guys were there to improve my understanding of NotePad and it’s configuration.

  • Loosing previous session on reopen

    2
    0 Votes
    2 Posts
    228 Views
    xomxX

    @Maxima-120

    Your N++ debug info? (paste here info from the N++ menu ? -> Debug Info…)

    Was there a Windows restart/shutdown involved? I mean - you (or Windows OS itself) restarted your PC while N++ was still running and then you have lost your N++ tabs after reopening the N++?

  • Hide comments mode

    11
    0 Votes
    11 Posts
    5k Views
    Alan KilbornA

    There’s a possible solution for this thread’s topic, HERE.

  • What are the red and green vertical marks on the left?

    2
    0 Votes
    2 Posts
    3k Views
    PeterJonesP

    @Juan ,

    See the FAQ

  • Wikipedia vs. NP++ character sets

    5
    1 Votes
    5 Posts
    261 Views
    Paul WormerP

    @PeterJones I corrected it, one less error in WP!

  • How about if User Defined Language could override the global theme ?

    3
    0 Votes
    3 Posts
    309 Views
    EkopalypseE

    @Soyar-Tom

    See here and here.

  • Can't visit online manual website ?

    5
    0 Votes
    5 Posts
    320 Views
    Soyar TomS

    @PeterJones
    Thank a lot , it works now. So i’d better to backup an offline manual to reference api . Thank everyone .

  • Font Linking to display glyphs not in font

    14
    0 Votes
    14 Posts
    1k Views
    astewart77A

    @Richard-J-Otter said in Font Linking to display glyphs not in font:

    @astewart77 My understanding was that those registry settings were deprecated in later Windows versions. But the whole area seems badly documented in MS literature.

    Here is a fresher link, dated Nov 2022, to a MS doc page for font fallback / fontlink. No mention of deprecation.

    I have seen instructions on Google successful in Windows 10. On the other hand, this github bug report for Notepad++ says it stopped working after a Windows 11 release, for certain conditions. Apparently, it was still working in Windows 11 prior to that.

    Using something that’s deprecated doesn’t make you a bad person. If your registry has font linking enabled, there will already be some entries there. No harm in adding an entry.

  • Find NULL Lines with RegEx

    5
    0 Votes
    5 Posts
    5k Views
    Alan KilbornA

    @rdipardo

    I think your guess as to the OP’s data may have hit the nail squarely on the head.

    It would have been abundantly clear earlier if the OP had posted a screenshot of what he was working with.

  • Restarting windows popup

    2
    0 Votes
    2 Posts
    225 Views
    Alan KilbornA

    @Daryl-Vine

    See HERE for more information on this topic.

    To QUOTE the developers, “Already fixed, will be in the next N++ version” (presumably meaning 8.4.8).

  • autocomplete with every word a different color

    4
    0 Votes
    4 Posts
    883 Views
    PeterJonesP

    @B-M ,

    I was actually cogitating over this for the past day, because I thought a simplified version of your request might be doable in a scripting plugin:

    If you are willing to use a script for the PythonScript plugin and run it manually, then this might be enough for you.

    23883-highlight-frequent-words.py PythonScript Instructions

    When you run the script, it will analyze the active file’s wordlist, and assign a foreground color to the N most-frequent words from the active file. (It will ignore 1 and 2-letter words, and anything in the list of stopwords. The default stopwords include some linking verbs, conjunctions, articles, and prepositions; there are probably other words that should be in the default list, but it was enough for proof-of-concept.)

    You can edit the script to change the “stopwords” by adding words into the string. You can change the palette by editing the list in def createPalette(): , and by doing that, you can change how many words will be colored.

    The 2022-Dec-13 source for the script is included in the post. The link above will always take you to my most recent version (in case I make future bugfixes or feature additions).

    Script

    # encoding=utf-8 """in response to https://community.notepad-plus-plus.org/topic/23883/ When run, this script will count all the words (except for stopwords), and assign a color to each word in the list of Top N Colors Edit the contents of the stopwords variable to change which words are ignored - the default stopwords are some linking verbs, conjunctions, articles, and prepositions - words of 1 or two characters are automatically annoyed Edit the list of appended colors in createPalette() to change the color palette - you can change the colors to your liking - you can add or remove colors to change the number of words that will be colored - the default color list is based on mspaint.exe's palette on my laptop Based heavily on these: - @Alan-Kilborn https://community.notepad-plus-plus.org/post/61801 - @Ekopalypse https://github.com/Ekopalypse/NppPythonScripts/blob/master/npp/EnhanceAnyLexer.py """ from Npp import editor,notepad,console, INDICATORSTYLE, INDICFLAG, INDICVALUE from random import randint class FrequentHighlighter(object): INDICATOR_ID = 0 stopwords = """ be am are is was were been has have and but or nor for yet so the an aboard about above across after against along amid among around as at before behind below beneath beside between beyond but by concerning considering despite down during except following for from in inside into like minus near next of off on onto opposite out outside over past per plus regarding round save since than through till to toward under underneath unlike until up upon versus via with within without """.split() @staticmethod def rgb(r, g, b): ''' Helper function Retrieves rgb color triple and converts it into its integer representation Args: r = integer, red color value in range of 0-255 g = integer, green color value in range of 0-255 b = integer, blue color value in range of 0-255 Returns: integer ''' return (b << 16) + (g << 8) + r def match_found(self, m): self.word_matches.append(editor.getTextRange(m.span(0)[0], m.span(0)[1]).lower()) def createPalette(self): self.palette = [] self.palette.append(self.rgb(237,28,36)) self.palette.append(self.rgb(255,174,201)) self.palette.append(self.rgb(255,127,39)) self.palette.append(self.rgb(255,201,14)) self.palette.append(self.rgb(255,242,0)) self.palette.append(self.rgb(239,228,176)) self.palette.append(self.rgb(34,177,76)) self.palette.append(self.rgb(181,230,29)) self.palette.append(self.rgb(0,162,232)) self.palette.append(self.rgb(153,217,234)) self.palette.append(self.rgb(63,72,204)) self.palette.append(self.rgb(112,146,190)) self.palette.append(self.rgb(163,73,164)) self.palette.append(self.rgb(200,191,231)) self.word_palette = {} # word palette will be populated later def go(self): self.createPalette() editor.indicSetStyle(self.INDICATOR_ID, INDICATORSTYLE.TEXTFORE) editor.indicSetFlags(self.INDICATOR_ID, INDICFLAG.VALUEFORE) self.word_matches = [] self.histogram_dict = {} editor.research('[[:alpha:]]{3,}', self.match_found) for word in self.word_matches: if word not in self.histogram_dict: self.histogram_dict[word] = 1 elif word not in self.stopwords: self.histogram_dict[word] += 1 elif word in self.stopwords: if word in self.histogram_dict: del self.histogram_dict[word] output_list = [] for word in sorted(self.histogram_dict, key=self.histogram_dict.get, reverse=True): if len(self.palette) > 0: self.word_palette[word] = self.palette.pop(0) # equivalent to perl's shift, where pop() without argument is perl's pop output_list.append('{}={} [0x{:06x}]'.format(word, self.histogram_dict[word], self.word_palette[word])) elif self.histogram_dict[word] > 1: output_list.append('{}={}'.format(word, self.histogram_dict[word])) #console.write('\r\n'.join(output_list) + "\r\n\r\n") # do the coloring self.colored = 0 editor.research('[[:alpha:]]{3,}', self.match_colorize) def match_colorize(self, m): a,b = m.span(0) word = editor.getTextRange(m.span(0)[0], m.span(0)[1]).lower() if word in self.histogram_dict: if not word in self.word_palette: return # console.write("{:<3d} => 0x{:06x}\tword='{}'[{}] from {}..{} = len:{}\n".format(self.colored, self.word_palette[word], word, self.histogram_dict[word],a,b,b-a)) editor.setIndicatorCurrent(self.INDICATOR_ID) editor.setIndicatorValue(self.word_palette[word]) editor.indicatorFillRange(a, b-a) self.colored = self.colored + 1 FrequentHighlighter().go()
  • How to Get Filenames within Regex??

    3
    0 Votes
    3 Posts
    493 Views
    Terry RT

    @Jerry-Goedert said in How to Get Filenames within Regex??:

    I would like to know if I could add the Filename within the file itself using regex with search and replace??

    As @Alan-Kilborn stated your question is a bit vague and if you gave more info, especially examples we might be able to help or direct you in some way to help you find the solution.

    However I do recall a couple of old posts that may relate in some manner to your question.
    See batch function - need to add filename at the end of each paragraph
    and
    How to get the Filenames after running “Find in Files” ?.
    They may give you some inspiration.

    Terry

  • Which questions can I ask here?

    2
    0 Votes
    2 Posts
    168 Views
    Alan KilbornA

    @Robert-Aarons said in Which questions can I ask here?:

    I’m new to this community. How can it help me?

    Welcome to the Community.
    It’s for user discussion about Notepad++, so that should tell you how it can help you.

    I’m a web developer and developed many websites
    I’d love to hear your thoughts on that

    The thoughts are: Don’t discuss that here, unless you are having some Notepad++ problem that relates to it.

  • find and compare single word notepad++

    7
    0 Votes
    7 Posts
    430 Views
    Derek TsuzeD

    i found the missing <end> tag manually at the file’s pointer

  • Backards match selected text in Find pop-up broken

    2
    0 Votes
    2 Posts
    161 Views
    Alan KilbornA

    @Steve-Michel said in Backards match selected text in Find pop-up broken:

    This must have been changed during the update

    Update process doesn’t change this.