• UDL for fortune

    3
    0 Votes
    3 Posts
    286 Views
    Alessandro-Barbieri 0A

    @PeterJones Thanks for the clarification!

  • How do I sort the listing of items in the Doc Switcher panel?

    1
    0 Votes
    1 Posts
    169 Views
    No one has replied
  • Using \\ as the start to a comment line

    2
    0 Votes
    2 Posts
    275 Views
    PeterJonesP

    Expanding a builtin language for anything other than a keyword is not something you can do without access to the source code.

    You could use a User Defined Language, but you’d probably feel it didn’t meet all your needs. If that was enough, a UDL will allow \\ to mark a comment line, like so:
    f71846ac-63a9-4a88-b670-384ca07fe399-image.png

    However, you can add extra highlighting to a builtin lexer (like the SQL lexer) using regexes via the script EnhanceAnyBuiltinLexer.py that @Ekopalypse shares in this linked post

  • Configure the styler to hightlight text

    2
    0 Votes
    2 Posts
    302 Views
    PeterJonesP

    “Until EOL” is easy: DELIMITERn open = :, close = ((EOL))
    Unfortunately, stop-on-other-whitespace is harder; not sure how it could be done natively in a Notepad++ UDL.

    There are two alternatives that I can think of:

    just define it as a delimiter with ((EOL)) closing it, but set the STYLE for that delimiter to allow nesting of anything else (that you have defined). For example, if = was defined in Operators 2 as magenta, Number defined with blue foreground and cyan background, Keywords 1 defined as Green/Bold with Area as the keyword, and DELIMITER1 defined with open = :, close = ((EOL)) and foreground=red, bg=yellow, nesting=operators2+numbers, I see:
    7f97a779-14f3-4046-b719-3abb641fdf54-image.png
    which might be enough for you. Otherwise, you can add extra highlighting to a UDL language using regexes via the script EnhanceUDLLexer.py that @Ekopalypse shares in this linked post
  • Automate shortcut configuration

    10
    0 Votes
    10 Posts
    584 Views
    EkopalypseE

    @Adnan-Haddad

    install procmon, set a filter for shortcuts.xml and run it.
    Start npp and see where it is loading the file from.
    Make your changes and close npp.
    Check if procmon informs about any error or whether npp
    was able to save it correctly.

  • Selecting, Leaving, Returning, then Copying from Find-Result window

    9
    0 Votes
    9 Posts
    425 Views
    EkopalypseE

    @Alan-Kilborn said in Selecting, Leaving, Returning, then Copying from Find-Result window:

    Maybe you can now that 7.8.3 offers …

    To be honest, I barely use the find window. In my workflow
    there is no need to do this often.

    I’ve never understood the “full keyboarding” approach, … occasionally grabbing the mouse gives the wrist a rest from constantly the same activity.

    :-) I don’t have this problem because the coding represents maybe 10% of my working time.
    At home, when I program for fun, I constantly have to take my hand off the keyboard,
    because I have to take the board off my head all the time, because of the stupid mistakes I make all the time. :-D

    Not sure this board off my head translated correctly.
    Blockhead seems to be the translation for Brett vorm Kopf

  • Combining character fonts don't work

    2
  • I have a problem

    5
    0 Votes
    5 Posts
    817 Views
    Marko JelićM

    @PeterJones tnx, you gave me more info than 2 days of searching on the internet, have a nice day :).

  • unattended installation with progress bar

    2
    0 Votes
    2 Posts
    397 Views
    andrecool-68A

    @aristosv Not!
    Installation from the command line hides the entire installation process)))

  • How to save all new files automatically with .txt extension?

    3
    0 Votes
    3 Posts
    374 Views
    andrecool-68A

    Change these settings (clear this flag)

    Imgur

  • Can User Defined Command Save Current File First?

    6
    0 Votes
    6 Posts
    1k Views
    Sylvester BullittS

    @PeterJones Yay! Got it work without having to mess with NppExec interface. For the benefit of anyone who wants to do this with Firefox & Windows 10, the macro below is what I finally settled on. I used a keyboard shortcut of Ctrl-Shift-Enter (your mileage may vary on other systems, especially the virtual key number).

    Thanks for help and patience, Peter. If you’d like to see the the Web site I’m using it for, it’s at http://www.hymntime.com/tch. I’m editing several hundred files, so this will be a tremendous help!

    <Macro name="Save File and Launch in Firefox" Ctrl="yes" Alt="no" Shift="yes" Key="13"> <Action type="2" message="0" wParam="41006" lParam="0" sParam="" /> <Action type="2" message="0" wParam="44100" lParam="0" sParam="" /> </Macro>
  • I need help to run the code on notepad++

    2
    0 Votes
    2 Posts
    204 Views
  • extract XMl with regex

    31
    0 Votes
    31 Posts
    3k Views
    PeterJonesP

    @vijay-S ,

    Please stop marking most of your normal discussion as “plaintext” or “code”. That </> CODE button (or manually using the ``` lines before and after) is used to highlight text that you need to keep raw – like code, or example text for your data – it is not meant to format every paragraph of your discussion. It makes it really hard to read.

    As proof, here’s my last paragraph in CODE mode; notice how hard it is to read?

    Please stop marking most of your normal discussion as "plaintext" or "code". That `</> CODE` button is used to highlight text that you need to keep raw -- like code, or example text for your data -- it is not meant to format every paragraph of your discussion. It makes it really hard to read.

    Don’t get me wrong: It’s great for example text – so keep using it for when you are asking about certain text that you are trying to work with. But don’t use it for your normal conversation paragraphs.

    Back to your clarification:

    The regex works in 7.8.8

    There is no such version as 7.8.8 (at least, not yet); v7.8.2 has been released, and there is a release-candidate for v7.8.3. I will assume you mean v7.8.2, since that was the newest when this conversation started.

    The regex works in 7.8.8 7.8.2 not in 7.3.3 in case if the selected xml is big

    Regarding there being a bug in v7.3.3 that isn’t present in v7.8.2: What do you expect? Do you expect a bugfix version of v7.3.3? The version number is incremented as bugs are fixed or features are improved. If v7.3.3 has a bug that you need fixed, you need to move to a newer version that has the bug fixed; you have already admitted that the feature works in newer versions. So if you need a version with the bug fixed, use the version with the bug fixed. If you don’t need a version with the bug fixed, feel free to stick with the old v7.3.3; either way, don’t complain that the bug still exists in the old version when you know it’s fixed in a newer version.

  • Add numbers to certain word?

    4
    0 Votes
    4 Posts
    363 Views
    EkopalypseE

    @PeterJones said in Add numbers to certain word?:

    i think it would take less than 50 lines of perl or python to do it

    That’s for sure :-)
    c3RhcnRfbGluZSwgZW5kX2xpbmUgPSBlZGl0b3IuZ2V0VXNlckxpbmVTZWxlY3Rpb24oKQ0Kc3RhcnRwb3MgPSBlZGl0b3IucG9zaXRpb25Gcm9tTGluZShzdGFydF9saW5lKQ0KZW5kcG9zID0gZWRpdG9yLmdldExpbmVFbmRQb3NpdGlvbihlbmRfbGluZSkNCmVkaXRvci5yZXJlcGxhY2UoJyg/PD1YKShbKy1dP1xkW1xkXC5dKyknLCBsYW1iZGEgbTogZmxvYXQobS5ncm91cCgxKSktMSwgMCwgc3RhcnRwb3MsIGVuZHBvcyk

  • How to remove this + Icon in Post it view

    2
    0 Votes
    2 Posts
    279 Views
    EkopalypseE

    @MasterKingStar

    I’m afraid but as far as I know, you can’t get rid of it.

  • Regex to increase or decrease last digit in line by one.

    7
    0 Votes
    7 Posts
    837 Views
    Alan KilbornA

    I should add that it works for this reason:

    .+ :

    .+ matches (one or more characters) as much as it can before moving on. Also known as the “maximum munch”. So given the pattern .+\d and the string-to-test as abc123def345 the .+ part would match abc123def34 because the ending 5 would satisfy the \d in the pattern.

    .+? :

    .+? matches (one or more characters) as little as possible before moving on. Also known as the “minimum munch”. With the pattern .+?\d and the same string-to-test, the .+? part would match abc because the following 1 would match the \d.

  • Change the text on clickable link

    2
    0 Votes
    2 Posts
    706 Views
    PeterJonesP

    Is this possible?

    Nope.

    Notepad++ is a text editor. It is for looking at and editing the source code, it is not a rendering engine.

    That said, there are some text formats, like Markdown, which can markup text, and if you have a rendering engine, that text will be rendered differently. You can use the Notepad++ Plugins > Plugins Admin to install the MarkdownViewer++ plugin, which embeds a Markdown rendering engine in Notepad++; using that plugin, you can edit the Markdown source code in one pane of Notepad++, and have it rendered in the MarkdownViewer++ pane of Notepad++. In such a circumstance, using the Markdown syntax [Debian](https://debian.org) would render in the MarkdownViewer++ pane as Debian, while still being clickable in the viewer pane.

  • find in Files = wrong endcodet result

    2
    0 Votes
    2 Posts
    234 Views
    PeterJonesP

    Sometimes, it’s best to turn off autodetect of the character encoding, and then manually set the correct encoding through the Encoding > Character Sets menu. There is no 100%-accurate encoding-detection method, because those “encodings” are all 8bit encodings, and so are technically using the same 8bit values (bytes) to indicate different characters; there are some hints that will emphasize certain bytes happen with greater or lesser frequency, which is how encoding auto-detect works; but there is no way to be 100% sure of which of those encodings are used without embedded metadata.

    (Or always edit files that use a full-unicode-compatible encoding, such as UTF8 or UTF-16/UCS2 – but of course, your data isn’t in that format; though you could use iconv or similar tool; if you search the forum for “iconv”, you will see some example usages of it)

  • how to control Clipboard History paste destination please?

    5
    1 Votes
    5 Posts
    726 Views
    Alan KilbornA

    @saylor68

    Well, not sure I follow your use case all that well… But another thing occurred to me: Maybe you should go more “global”: Instead of Notepad++'s clipboard history manager, try a global Window clipboard manager; there are many out there to choose from, but I have seen here that people recommend one called “Ditto”.

  • Search Result Window No Longer Opens

    10
    0 Votes
    10 Posts
    2k Views
    guy038G

    Hi, @sylvester-bullitt, @peterjones, @alan-kilborn and All,

    OMG ! I just forgot this trivial but simple method. Thus, whatever the contents of the <GUIConfig name ..... </GUIConfig> section :

    <GUIConfig name="DockingManager" leftWidth="L" rightWidth="R" topHeight="T" bottomHeight="B"> ..... ..... ..... ..... </GUIConfig>

    Open your active config.xml file, with Microsoft notepad ( Do NOT use Notepad++ )

    Delete all the lines in between

    Change the 4 dimension attributes, L, R, T and B, to the value 200, giving, simply :

    <GUIConfig name="DockingManager" leftWidth="200" rightWidth="200" topHeight="200" bottomHeight="200"> </GUIConfig>

    Save the modifications of the Config.xml file

    Restart Notepad++

    That’s all. Et voilà !

    Remark : of course, this basic method hides all your previous visible panels, as well !

    Cheers,

    guy038