• Tab Changed appearance on update

    11
    0 Votes
    11 Posts
    1k Views
    pmeriwetherP

    @PeterJones
    @mkupper
    I found I am able to change the color through using customized tones, please see the screenshot.
    d5a26ff8-21e1-49d8-8f14-e476936283d9-image.png
    I can take it from here, thank you both!

  • Order of switching documents

    2
    0 Votes
    2 Posts
    228 Views
    Alan KilbornA

    @Alex-Shinkus

    See the user manual HERE for an explanation.

  • VScode CTRL+P equivalent

    9
    0 Votes
    9 Posts
    2k Views
    NippurDeLagashN

    @Michael-Vincent Nice plugin. I installed it, and it works fine. Just a minor issue: by default, Ctrl-P is assigned to two commands: “Print” and “Quick Open”.

    The quick fix is to open Notepad++'s shortcut mapper, and assign a different key to one of these commands (either “Print” in the
    “Main menu” tab, or “Quick Open” in the “Plugin commands”).

  • Function List not work to show list of JavaScript Functions

    2
    0 Votes
    2 Posts
    226 Views
    Lycan ThropeL

    @Wira-Djingga-Media ,

    Possibly because that file you have showing in the panel is titled index.php and not index.js ?

    A picture will not help anyone understand anything, except that you may be expecting syntax highlighting from one language to show in the syntax highlighting of another language. Check yourself, and read the FAQ’s at the begining of the forums to learn how to format text and ask your question.

    Since I don’t use php, I can’t confirm or deny that this type of behavior is normal, so it will be up to someone else to verify if my diagnosis is correct or flawed, but from what I’ve seen, standard practice is that the language that is used to syntax highlight a code file, is dependent upon the file extension. Someone else will also have to paste the relevant links to FAQ’s as I don’t have them as nicely layed out as @PeterJones does in his responses. :-)

  • 0 Votes
    5 Posts
    445 Views
    wonkawillyW

    @Alan-Kilborn

    Yes, I was and I suppose I still am. That happened because a while ago I posted a very long and elaborated proposal of mine aimed to improve Npp Search and Replace dialog (it still is online) and I spread the word posting some invitations to other users to read that post because I reputed it interesting even for others not only for me.

    Than other users told me that I was mistaken doing so (about those invitations I posted) consequntially the day after or so (I don’t remember exacly), I deleted all posts I made in such an occasion because I didn’t want to be punished just for a venial sin, but I was banned anyway. Patience, it happens.

    I am still young and I was (and still am) very thrilled to be free in speeching (writing actually) and spreading ideas to improve Npp itself, wich is in principle a great shared projet by an international and varigated Comunity that overcomes local differencis to collaborate on a comon and noble objective.

    Of course my behavior didn’t mean any offence for anybody, but you know, I live in a Nation where there is freedom of speech, writing and so on as well as freedom of sharing and spreading ideas among others especially if aimed at the common good, and at that time I didn’t know yet that on Github (or maybe just in that project?) there was not such kind of freedom of posting for spreading ideas: so I didn’t see it coming especially from Npp Project space.

    In fact if I am not mistaken even Npp defended freedom and indipendence and other noble right in multiple occasions and because of that I felt free of sharing and spreading my ideas too, for improving Npp, as the example given by themselves in multiple occasions as for example.

    Notepad++ 8.4 (Stand up for Ukraine)
    Notepad++ 8.3.3 (Make Apps, not war)
    Notepad++ 8.3.2 (Declare variables, not war)
    Notepad++ 8.3.1 (Boycott Beijing 2022)
    Notepad++ 8.3 (Boycott Beijing 2022)
    Notepad++ 7.9.2: (Stand with Hong Kong)
    Notepad++ 7.9.1: (pour Samuel Paty)
    Notepad++ 7.9: (Stand with Hong Kong)
    Notepad++ 7.8.9: Stand with Hong Kong
    Notepad++ 7.8.3: (Free Uyghur)
    Notepad++ 7.8.2: (Free Uyghur)
    Notepad++ 7.8.1: (Free Uyghur)
    Notepad++ 7.6.2 (Gilet Jaune Edition)
    Notepad++ 6.7.4 (Je suis Charlie edition)
    Notepad++ 6.6.4 (Tiananmen June Fourth Incident Edition)

    And I suppose even in other occasions and also I believe those initiatives really respectable.

    Of course you can immagine I was in good faith and I did not mean doing nothing offensive for anybody.

    I only hope I will not be banned for life just for that venial sin, but I can’t say for sure: after all every one has the right to admin its own online space at the best of own possibilities. And this too is a right and an act of freedom after all. So no hard feelings for that misadventure: as I sad some times it happens.

  • Recovering after modified by another program

    13
    0 Votes
    13 Posts
    4k Views
    Lycan ThropeL

    @mkupper ,
    The user has that choice, by selecting the appropriate Settings->Preferences->Backup dialog choices. In particular if they enable Verbose Backup , they can get to have time stamped backups.

    In my IDE, situation, anytime a file is changed, the backup is saved, so I have the option already in my IDE to be able to undo the last saved changes. That’s something any computer user needs to learn right off the bat, and coddling neophytes by doing it for them, does not benefit them, in the long run. They would still be oblivious to the realities of computing. In addition, most (and I emphasize, MOST) users of NPP are not that oblivious to computing practices. The ones that are, need to learn, or they will continuer to make mistakes and blame the world and the author of the software.

  • Compare files

    2
    0 Votes
    2 Posts
    270 Views
    Alan KilbornA

    @Friedrich-Wilhelm

    There are comparison plugins, ComparePlus comes to mind.
    See Plugins menu > Plugins Admin…

  • Function List able to show PHP Comments?

    12
    0 Votes
    12 Posts
    1k Views
    Stephan Romhart 0S

    @MAPJe71 Thank you!

  • 0 Votes
    2 Posts
    184 Views
    PeterJonesP

    @Maarten-Klap ,

    See my answer to this very similar post, because the concept behind the reason it’s not working for you is the same as for that other user.

  • delete entries with different termination and add a line to those entries

    2
    0 Votes
    2 Posts
    246 Views
    PeterJonesP

    @Nuno-Paulo ,

    Unfortunately, your post uses inconsistent indentation, and the forum interprets some, but not all, as putting it into a forum code box. Next time, make sure you paste your text exactly, then highlight all the pasted text in your post, then click the forum’s </> toolbar button, so that it all ends up in the same box with correct indentation.

    Your use of “termination” is too vague for me to be able to guess what you mean. And you don’t tell us how to know where “status off” should be added, or how to know what constitutes “an entry”

    It would be really nice if you showed before and after data in separate text boxes (using the </> button), like,

    before

    one block two blocks three blocks

    after

    1 block 2 blocks 3 blocks

    If we were to try to guess what you intended, it’s likely to be wrong, thus wasting both our time and yours. Good luck.

    ----

    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
  • How to macro task " find in files"

    2
    0 Votes
    2 Posts
    731 Views
    PeterJonesP

    @Tam-LE ,

    Macro recording for searches records the text of the search – it doesn’t notice that you pasted the text into the search field. Sorry. I don’t think a macro is powerful enough for what you want.

    There are scripting plugins, which bring the full power of your favorite scripting/programming language (Python, Lua, JS,…). If you have a preference, I’d suggest installing that plugin and writing a script in that language that runs the appropriate Notepad++ commands. If you don’t know any of those languages, and if someone has enough details from you and enough time and interest, they might be willing to write a quick script for the PythonScript plugin (the most commonly-used scripting plugin in this forum) – but you will have to be more specific as to what you mean by each of your steps, because there’s lots of ambiguity. (For example, you said, “first text value” – but is that a character, a word, a line, a paragraph, a … Each of your brief phrases is way too short for anyone else to be able to help you translate that into code.) Actually, if you have saved your macro, then exit Notepad++, then open %AppData%\Notepad++\shortcuts.xml, and go to your saved macro, and copy all that XML and paste it in here, then select the text in your post and click the forum’s </> button to wrap it so it shows up in a plain text / code box – with the contents of your existing macro, we can get rid of all ambiguity about what you are selecting and copying, and I think there are a some of the regulars here with the skill to both read that macro and to translate those same ideas into PythonScript.

  • Editing Persian text

    8
    0 Votes
    8 Posts
    1k Views
    Varoujan AdamianV

    @Ekopalypse Thank You

  • Help or little bug

    3
    0 Votes
    3 Posts
    223 Views
    Alan KilbornA

    @Andrea-Astolfi-0

    Long known issue; see HERE.
    Not sure it is an issue for everyone, as it doesn’t seem to affect me.

  • Don't treat parenthesis as codeblocks start/end

    2
    0 Votes
    2 Posts
    191 Views
    PeterJonesP

    @geoslake ,

    Without editing the source code and compiling your own copy of Notepad++ and the libraries it ships with, you are not able to change the logic of the built-in languages like C++. It would be a lot easier to create a User Defined Language (UDL) than it would be to modify the logic for C++.

    I would suggest trying to learn the UDL. You don’t tell us anything about your pseudo-language for your “passwords and things” (whether there are “keywords” you want to have highlighted, whether you use braces for nesting, and that sort of thing), so it’s hard to give you any hints. But the Language > User Defined Language > Define Your Language has a link to its documentation in the dialog box / panel, and that documentation is pretty newbie-friendly, IMO.

    -----
    edt: “don’t treat parentheses as codeblocks start/end” => do you mean () (which are generally called parentheses) or {} (which are often called curly braces or just braces). If you don’t want curly braces to be interpreted as blocks for indentation/folding, then the CPP lexer really isn’t the best choice for you. I really think you need to show us some example text (use the </> in the forum to mark that text as plain text), then paste in a screenshot of the text as highlighted by the lexer, and maybe explain which elements of the highlighting you like, and which you don’t. Because if all you have is a list of keywords that you want highlighted, then the UDL is dead simple: just go to the keywords tab, type those keywords, assign a color in the Style button, and maybe put a default extension for your so that a file with that extension will always use your UDL.

  • code block trigger string doesnt work when first character is ";"

    Locked
    8
    0 Votes
    8 Posts
    4k Views
    PeterJonesP

    Future Readers,

    As mentioned in a 2023 follow-on conversation:

    the “problem” was because ; was defined as the start of a comment for comment-highlighting. The UDL parser doesn’t look for Fold in code 1 or Fold in code 2 keywords for folding when they are contained in Comment lines. Instead, if ; is defined as the start-of-comment-line in the Comment & Number tab, then on the Folder & Default tab, you can define Folding in comment’s open/close pair, and that will allow a special keyword pair to work for folding using comments to start and end the folding. This is true in 2023’s v8.5.3, and this was true in 2016’s v6.9.2.

    Follow-up discussion on this should go in the follow-on conversation rather than in this ancient conversation, which is being locked.

  • 0 Votes
    11 Posts
    662 Views
    PeterJonesP

    @waskoma said in strings starting with “;” ignored when given in codeblock start/end string definition:

    so I have managed to achieve it and am REALLY happy. Gave up solving this a long long time ago (have already asked here and got answer it can not be done)

    in 2016, it looks like you both forgot to come back and follow up on the conversation, so it was never resolved; that’s not quite the same as being told it cannot be done. Under this username, you have no other posts.

    not related to this topic but can I ask more? I have hexadecimal numbers with prefixes $ or #$ and these numbers have abcdef letters in them, they are not recognised as numbers the moment it finds a non numeric character, is there a way to solve that ?

    Prefix 2 is where you put the prefix you want before hex numbers – in your case, $ #$ will allow either $ or #$ as the prefix. Extras 1 is where you put the extra characters that can be a part of a hex number – in your case A B C D E F a b c d e f (the comparison in UDL for that is case sensitive, so if you want it to match upper and lower case for hex digits, you have to include both upper and lower case)

    c31e41d9-04a9-44fe-a47b-fb7001fc4c50-image.png

    BTW: That’s in the UDL docs at https://ivan-radic.github.io/udl-documentation/ – which are linked from the UDL dialog – specifically, on the Numbers page. They give the example of how to make 0xABC work, and from there, you really should have been able to generalize that to make $ABC or #$ABC work.

    also what causes these orange vertical lines show up ? and how to style the codeblock opener closer + and line ? a million thanks :)

    As you discovered, that’s the new Change History feature (v8.4.6), as described in our FAQ.

  • Fixed Format FORTRAN Highlighting

    7
    0 Votes
    7 Posts
    931 Views
    PeterJonesP

    @Daniel-Crosby ,

    EnhanceAnyLexer does not change bold/italic/underline, so it cannot do the job. If you change the Style Configurator for the keywords to turn off bold, then the EnhanceAnyLexer color-change should be sufficient for you – though of course, that means that keywords in non-comment lines would just be colorful without any bolding.

  • Restore temp item - Please Help..

    3
    0 Votes
    3 Posts
    4k Views
    Mark OlsonM

    There’s also the %AppData%\Local\Temp\Notepad++ RECOV folder. The files in that folder will have the .dump extension. Don’t know how reliably N++ will write unsaved files to that folder, but it’s worked pretty well for me recently.

  • Open file...

    5
    0 Votes
    5 Posts
    358 Views
    CoisesC

    If you edit the properties of the shortcut you use to start Notepad++ and change “Start in:” to the folder you want, File|Open… will use that folder as default until another is established.

  • Search a number grater than

    9
    0 Votes
    9 Posts
    3k Views
    Mark OlsonM

    @Alan-Kilborn
    With your script as inspiration, I made one that has a different custom search func for each file, allows the user to set the search func with selected text, and the user can choose whether or not to bookmark lines.
    63ddf9b8-22a9-411a-8448-33a055dcf3fa-image.png

    # -*- coding: utf-8 -*- # references: # https://community.notepad-plus-plus.org/topic/24481 from Npp import * import operator import re # Too lazy to parse config files; just modify these global variables instead BOOKMARK_LINES = True class FBOLTN: def __init__(self): self.set_comparator() def set_comparator(self): comparator_regex = re.compile("([><]=?|=)(-?\d+)") sel = editor.getSelText() mtch = comparator_regex.search(sel) if mtch: # user is selecting a new comparator compstr, numstr = mtch.groups() num = int(numstr) else: if hasattr(self, 'comparator'): return # only override current comparator with valid selection # default is what the OP wanted compstr = '>=' num = 25 self.compstr = compstr self.num = num def comparator(other_num): fun = { '>': operator.gt, '<': operator.lt, '=': operator.eq, '>=': operator.ge, '<=': operator.le, }[compstr] return fun(other_num, num) self.comparator = comparator def custom_match_func(self, m): if self.stop: return i = int(m.group(0)) start, end = m.start(0), m.end(0) if self.comparator(i): editor.setSel(start, end) if BOOKMARK_LINES: notepad.menuCommand(MENUCOMMAND.SEARCH_TOGGLE_BOOKMARK) self.stop = True def search(self): self.stop = False editor.research(r'(?<!\w)-?\d+\b', self.custom_match_func, 0, editor.getCurrentPos()) if __name__ == '__main__': try: fboltns except NameError: fboltns = {} cur_fname = notepad.getCurrentFilename() if not fboltns.get(cur_fname): fboltns[cur_fname] = FBOLTN() fboltn = fboltns[cur_fname] fboltn.set_comparator() fboltn.search()