• Can't visit online manual website ?

    5
    0 Votes
    5 Posts
    328 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
    227 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
    894 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
    505 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
    172 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
    440 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
    163 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.

  • Is there a setting to not show quotes?

    5
    0 Votes
    5 Posts
    514 Views
    Chuck DicksonC

    @PeterJones Well there you go! Thank you!!! :)

  • Names of character sets

    22
    0 Votes
    22 Posts
    3k Views
    Harry ArthurH

    Thanks for the discussion guys. It really helps me to figure out my problem.

  • File Specific word wrap (vs. global enable)

    22
    1 Votes
    22 Posts
    14k Views
    Alan KilbornA

    I revisit the original topic of this thread HERE.

  • Replace symbols around a word

    9
    0 Votes
    9 Posts
    721 Views
    kathie carolinaK

    Replacing symbols is very simple if you use Facebook symbols. I learned a lot from this website, which has a great article on each symbol. You can convert your whole article into a symbol if you have knowledge about it.

  • "In selection" checkbox for replacing in selected lines

    3
    0 Votes
    3 Posts
    304 Views
    Alan KilbornA

    @Alan-Kilborn said in “In selection” checkbox for replacing in selected lines:

    But… it does seem a bit inconsistent and “at odds” that when enough text is selected to cause In selection to be auto-checked, that the selected data is also copied into the Find what box.

    I created an official ISSUE for this oddness.

  • Invert Background and forground colors on select words in a document

    2
    0 Votes
    2 Posts
    357 Views
    PeterJonesP

    @Tony-Mongiello said in Invert Background and forground colors on select words in a document:

    Is there a way to “format” selected characters in a document and invert the fore and background colors?

    Not permanently. This is a text editor, and text (like a .txt file) doesn’t store things like font and color.

    There are ways to convince Notepad++ to higlight things: you can use the Mark dialog to temporarily mark things, or the Search > Style All Occurrences / Style One Token actions to add color (similar to inverse video) temporarily. But that doesn’t get saved in the file, because that’s not a feature of text files.

  • find and replace:why i just can type 3640 bytes in find Input box

    8
    0 Votes
    8 Posts
    519 Views
    WELL MaxW

    @Alan-Kilborn Thank you very much for your patience

  • Enable Close All confirm dialog

    2
    0 Votes
    2 Posts
    200 Views
    Alan KilbornA

    @datatraveller1 said in Enable Close All confirm dialog:

    Does this mean it will come true?

    One never knows…

    There’s a PythonScript that solves the problem HERE if you want to have a solution to your desire right now.

  • Space bar candidate for auto-completion key ;¬).

    11
    0 Votes
    11 Posts
    1k Views
    José Luis Montero CastellanosJ

    @Michael-Vincent
    Thanks for your observations,
    I’ll try your suggestion and see what happens.

    Although my exposed idea is precisely so that Notepad++ does not need PhythonScript or NppExe, that is to say that it is self-sufficient (autoFillup).

    I have noticed in some comments (not in this thread) that to support an argument, the exception is used and not the rule.

    If programming were based on exceptions, trillions of different algorithms would be needed to handle each particular case, thing which @PeterJones once used as an argument in one of our entertaining debates :)

    Currently, I am studying the PythonScript manual to put it into practice, something that @PeterJones himself suggested. Until then, It is possible that my answer will take time and end up giving everyone the reason… Will I be able to? ;-)

    Have a good afternoon.

  • I want to prevent the font size from changing with the mouse wheel

    4
    0 Votes
    4 Posts
    542 Views
    s sS

    @Michael-Vincent
    Wow, I didn’t know there was such a plugin.
    thank you very much. solved.

  • New version of Notepad++ has an undesirable addition

    2
    0 Votes
    2 Posts
    245 Views
    EkopalypseE

    @Infinix-DXB

    Settings->Preferences->Backup should contain everything you need, right?