• Notepad++ in Right-To-Left (RTL) mode

    10
    1 Votes
    10 Posts
    8k Views
    rdipardoR

    @mkupper said in Notepad++ in Right-To-Left (RTL) mode:

    Keep in mind that while something like Notepad++ looks like text it’s a graphical display.

    This really is the heart of the issue. What the end-user sees in the edit window gets there by a system-dependant pipeline that starts by loading the font file, mapping a character to physical keystrokes (or IME input), measuring the size of the client area to be filled by the character, drawing it, then recomposing the client area all over again by shifting every other character that was already there. By that point, we are as far removed from Scintilla and Notepad++ as this conversation has come.

    Text direction is entirely up to the graphics device, which varies widely across platforms, and Scintilla has to maintain support for 3 of them (maybe 4, if we include Qt, which is really just an obsessively object-oriented wrapper atop the C-language libraries underpinning the given operating system). Worse, Notepad++ has always used the oldest, most backward-compatible APIs the Windows platform has to offer, and legacy GDI’s concept of RTL is literally a geometric flip called “mirroring”: https://learn.microsoft.com/en-us/globalization/localizability/mirroring-in-win32

    @JamesWebb said in Notepad++ in Right-To-Left (RTL) mode:

    @mkupper said in Notepad++ in Right-To-Left (RTL) mode:

    We are surrounded by structural racism and/or discrimination.

    Reply

    Apology. But I’m not agree. 😉

    I think @mkupper was talking more about 30 years ago, when, for example, the GDI interface was written, by American engineers, who obviously didn’t care enough about international users to bother writing APIs that could properly draw “foreign” languages. Their design choices actually do prejudice the user experience of Persian, Arabic and Hebrew speakers. But nobody on this forum can do anything about that, or needs to apologize for it.

    There is no shortage of word processing software that can intelligently produce text in a variety of international languages. Notepad++ is currently not one of them.

  • Notepadd++ freeze

    4
    1 Votes
    4 Posts
    729 Views
    mkupperM

    @Lhuillier-Sébastien asked:

    Is there alternatives for these plugin (just for Internet languages : php, html, css and Javascript)

    Usually, freezing is caused by a combination of things. Remove one element and the application does not freeze or does to less often. The current goal is to figure out which element(s) trigger the freezing you are experiencing.

    At present the plan is to disable plugins to see they are the cause of the freezing you are experiencing. If a particular plugin, or set of plugins, is found the the cause of the freezes then you will be able to re-enable the other plugins. You then also will have a choice to either not use or find a replacement for plugins that cause Notepad++ to freeze, or you can install those too and live with the freezing.

  • Disable Code Folding?

    16
    0 Votes
    16 Posts
    3k Views
    Alan KilbornA

    @Marc said in Disable Code Folding?:

    Presently, in Dec. 2023, this works:

    Settings —> Preferences —> Editing (on the left side)

    Then find the box that says “Folder Margin Style”, and select “None”.

    Multiple problems with these statements:

    “In Dec. 2023” doesn’t convey much information. Saying “In Notepad++ 8.6” would be much better, as that version is current in Dec 2023. (but, see the next point…)

    “Folder Margin Style” does NOT appear in “Settings —> Preferences —> Editing” as you state. It appears exactly where the previous poster said, in “Settings —> Preferences —> Margins/Border/Edge”

    So, basically your whole posting is wrong and indeed unnecessary. Sorry if that sounds harsh.

  • Horizontal Caret

    22
    0 Votes
    22 Posts
    3k Views
    JamesWebbJ

    @mkupper Many thanks for your help and advice. Your explanation about open-source project was like a crash course for me. I’m not a coder, so I don’t know much about it.

    Regarding the issue with the dash cursor, I realized that it’s not worth the effort since it doesn’t add much value. Also, since I have no coding knowledge, I can’t create my own repacked version of NP++ 😑.

    I have a question about selecting words in RTL. Whenever I try to select a word or words, if the line is left-aligned, the selection appears like a rolling film strip, making it difficult for me to see which word I’m selecting. However, if the line is right-aligned, the selection works normally, and I can see which word I’m selecting:

    https://mega.nz/file/R9YTASzC#cwWjdDfJG5XRGsqfUWrTuJBfF_iDPKA3NX_Oac9O5RM

    Do you know why NP++ has such odd behaviour? Is there any solution?

  • Shortcut Mapping for Hash Sign "#" not possible

    2
    1 Votes
    2 Posts
    227 Views
    PeterJonesP

    @Lumoryel ,

    On a standard US keyboard, the # shares the same key with 3, and to type a # you would use Shift+3. So for Shortcut Mapper, the Ctrl+# sequence is really Ctrl+Shift+3

    Update 1: In this post, @guy038 has shared all the possible combinations available to the shortcut mapper._

    Update 2: In another discussion, @dinkumoil shared how some of the german keyboard virtual-key codes (VK) line up with the Shortcut Mapper: that one shows that there is a separate # key, which has the same VK_OEM_2 as the / ? key on the US keyboard, so, for shortcuts, the # key on a German keyboard is / in Shortcut Mapper. (Given that you’re asking about the # key, I am guessing you might be using a German keyboard; but it’s just a guess.)

    Update 3: @guy038’s original list of combos has been moved to the FAQ section; @dinkumoil’s post has been replicated in that FAQ; and I have added a reference at the end of the FAQ to be able to easily explore the VK for any given keyboard, so that if you’re not using US, French, or German keyboards, you can still find out what VK each key is.

  • Minor typo in the manual for regex control character \c☒

    6
    0 Votes
    6 Posts
    590 Views
    mkupperM

    @guy038, @peterjones, and others.

    It turns out the \c☒ topic gets fairly messy, and is far too messy to document the details in the manual. I started playing with ANSI…

    \c☒ with ANSI or ASCII codes \x00 to \x7F works well and searches for the lower five bits of the ☒ character. Realistically, you should only do it with A-Z or a-z. Better yet is to use x## or x{####} style expressions as it’s clearer as to what is being searched for.

    A case sensitive search for \c☒ using ANSI codes \x80 to \xFF matches ANSI codes in the \xE0 to \xFF range, with some exceptions… The logic first extracts the lower five bits of ☒ and then bitwise-or that with 11100000 or 0xE0. For example, all of these will match ANSI character 0xEC which is ì.

    Hex Pattern \x8C \cŒ \xAC \c¬ \xCC \cÌ \xEC \cì

    The lower five bits of the above hex codes ‘\x8C’, ‘\xAC’, ‘\xCC’, and ‘\xEC’ is 01100 or \x0C and we bitwise-or that result with 11100000 or 0xE0 to search for \xEC.

    It turns out that with one exception, all of the ANSI characters in the \xE0 to \xFF range are lower case letters. A case-insensitive search for \c☒ using ANSI codes \x80 to \xFF works just like the case-insensitive version I just described but also matches the upper case forms of the letters in \xE0 to \xFF range.

    The one exception is ANSI character code \xF7 which is a divide by sign ÷. A search for \c—, \c·, \c×, or \c÷ only matches ÷ when you use a case-insensitive search.

    Searching for \c (\x20), \c@ (\x40), \c` (\x60), \c€ (\x80), \c  (\xA0), \cÀ (\xC0), and \cà (\xE0) all match NUL (\x00) in ANSI encoded files. With one exception also match NUL (\x{0000}) in UTF-8 encoded files. The exception is searching for \c€ (\x80) matches \x{000C} (form feed) and not NUL \x{0000}.

    Because searches for \c€ (\x80), \c  (\xA0), \cÀ (\xC0), and \cà (\xE0) all match NUL (\x00) in ANSI files it means you can’t use them to match the lower case à at ANSI character \xE0 nor it’s upper-case À at \xC0.

    I also ran across that while Notepad++ supports searching for \x00 or \x{0000} both which match a NUL (\x00 or \x{0000}) in a file using \x00 or \x{0000} in the replacement part both results in the replacement string getting terminated at the NUL (\x00 or \x{0000}) character.

    As replacement strings are terminated at the NUL using \c~ where the ~ is a NUL (\x00) returns Invalid Regular Expression with the details being:

    ASCII escape sequence terminated prematurely. The error occurred while parsing the regular expression: '>>>HERE>>>\c'.

    Using a search for xxx and replace of aaa\x00zzz or aaa\x{0000}zzz both result in xxx being replaced with aaa as the replacement string was terminated at the NUL. Apparently the engine first does a pass where it converted the \x☒☒ and \x{☒☒☒☒} forms of characters into the actual character value meaning \x00 or \x{0000} in a replacement simply terminates the string at that point.

    I suspect that bug could be used to add a comment to the replacement!
    Search: Hello
    Replace: World\x0 This will never happen

    Windows also use NUL as the text string terminator in its copy/paste system.

  • Beautify your code with LUA

    10
    1 Votes
    10 Posts
    2k Views
    Khundian TwitchK

    @PeterJones @mkupper

    While I agree that in a perfect world I wouldn’t make a post like this, but actually present a finished solution or product like a plugin… but one has only so much time between work and family.

    I’ll take a look at the lua script plugin somewhere in the future, I didn’t even know there was a LUA plugin. I just happen to stumble on this script when doing some research, and figured it could be helpful for other people too. Thats pretty much the only reason I posted it here on the forum.

    I currently have my hands full with a project, creating an UDL for notepad++. Beatutifying and auto indenting is on my list and will eventually get around to it, but at the moment I have other priorities. Such as writing calltips for about 3000 entries, and coming through on other promisses made.

  • Can't print with notepad++

    7
    0 Votes
    7 Posts
    7k Views
    Michael PowellM

    I think I see what happened. NP++ is interpreting the theme a bit too literally… even during print. Have not reviewed, maybe there are settings that workaround this “feature”, not sure…

    Okay, so instead of “Colour Options”, “No background colour”, which was how it was selected. Changed to “Black on white” and that solved the issue for me.

    Thanks!

  • Any plugins to extract selected text into a new file (for refactoring)?

    3
    0 Votes
    3 Posts
    393 Views
    mkupperM

    @pbarney, if the intent is refactoring then I don’t think you want to cut snippets out to put them in separate files as you are then creating a large problem of how to safely merge the refactored code back into the original source files.

    Thus, it’s usually better to to refactor in place.

    For large refactor projects I tend to use scripting languages to process the files rather than Notepad++. The choice of scripting languages does not matter as long as they are ones you are comfortable with.

  • Set the default language

    6
    0 Votes
    6 Posts
    2k Views
    Terry RT

    @john-selverian

    I personally think this is the wrong approach as to re-enable the setting for smaller files you will need to undo some/all of what you did.

    Were you aware that you can tell Notepad++ not to apply syntax highlighting (which is where the slowness comes from on large files) by enabling and setting a MB level at which to stop this.

    Just read this section of the online manual.

    Terry

  • N++ 8.6.0 keeps crashing

    8
    0 Votes
    8 Posts
    874 Views
    Luc Van der VekenL

    To be honest, I didn’t even remember most of them being installed.
    I just disabled the first half (alphabetically), and that seems to have fixed it already.
    That includes all the ones you listed, except for NPPJSONViewer.
    I’ll continue by removing HexEditor, I’ve got another tool for that, and updating the rest.

    Sorry for running such old crap and then bothering you with the problems…

  • How to change colorful Unicode emoji characters to monochrome?

    5
    0 Votes
    5 Posts
    2k Views
    rdipardoR

    @mkupper said in How to change colorful Unicode emoji characters to monochrome?:

    The benefit of enabling DirectWrite is that it allows for displaying various Unicode characters that otherwise display as an empty block ▯.

    Or, as hollow black-and-white glyphs, if the selected font supports them:

    d2d-0ff.png

    See also this old post for a demonstration of the SciTE editor’s analogous technology option.

  • What is the 'writeTechnologyEngine' option?

    2
    0 Votes
    2 Posts
    374 Views
    PeterJonesP

    @PiotrMP006 ,

    What is the ‘writeTechnologyEngine’ option?

    That attribute in config.xml is mapped to Settings > Preferences > MISC > ☐ Use DirectWrite – it affects how Notepad++ asks Windows what to do when a given font doesn’t have a glyph for a particular character, and some other behind-the-scenes, Windows-controlled stuff. If the attribute value in the XML is 1, then the settings checkbox is checkmarked ☑; if the attribute value in the XML is 0, then the settings checkbox is not checkmarked ☐.

    I assume this is a follow-on to your other recent question. I am not sure why you didn’t just reply to your other post with “oh, I see the writeTechnologyEngine option in config.xml: will that help me change the appearance of emoji?” – that would have made it more obvious to readers that the two questions were actually related.

  • How to paste words Paste in empty Lines? (With Image as Ex.)

    7
    1 Votes
    7 Posts
    1k Views
    guy038G

    Hello, @joe-junior, @coises and All,

    We do NOT even need the excellent plugin BetterMultiSelection of @dail, to achieve your goal !

    So, let’s suppose you have this first text, pasted in a new tab

    fgsdfg zerzer dghdgh sfgsfgsdfg uiuyiti cvwvb gjgjkgjk

    Now, you append this second text, below, which should be inserted, later, in between the first section :

    4654646 9789411314 131231786000841 8673131313321 6789131321 9788 78978978

    First, if necessary, we add one blank line, between each line of that second text, with the regex

    SEARCH \R

    REPLACE $0$0

    4654646 9789411314 131231786000841 8673131313321 6789131321 9788 78978978

    Now :

    Do a 13 × 15 rectangular selection of this second text

    Copy or cut this selection ( Ctrl + C or Ctrl + X )

    Move the caret / cursor at the first empty line of the first text

    Paste your rectangular selection ( Ctrl + V )

    => You should get, at once, your expected OUTPUT text :

    fgsdfg 4654646 zerzer 9789411314 dghdgh 131231786000841 sfgsfgsdfg 8673131313321 uiuyiti 6789131321 cvwvb 9788 gjgjkgjk 78978978

    Finally, delete :

    your second text, in case of a previous Ctrl + C

    The remaining empty lines block, in case of a previous Ctrl+X

    IMPORTANT :

    This test was performed on a version prior to the last one ( v8.6 ). So, just verify if this method would still work with the default bulit-in Multi-Editing behaviour of our last 8.6 version !

    Best Regards,

    guy038

  • x64 Updates

    3
    1 Votes
    3 Posts
    513 Views
    Thor SparksT

    I’m not able to “at” you due to it being detected as a link.
    Thank you for your quick and very thorough response mkupper!
    It led me to discover that my work computer was using a 32bit install rather than the 64bit install I normally use.

    Notepad++ v8.5.7 (32-bit)
    Build time : Sep 6 2023 - 23:07:35

  • Is there no XOR operator for booleans in golang?

    3
    0 Votes
    3 Posts
    372 Views
    Mark OlsonM

    Problems regarding a Golang lexer are in NppQuestions & GolangQuestions
    Problems regarding the existence (or lack thereof) of XOR in Golang are in NppQuestions ^ GolangQuestions

  • ZPL LANGUAGE

    3
    1 Votes
    3 Posts
    648 Views
    PeterJonesP

    @Jorge-Carlos ,

    I WOULD LIKE THE ZPL LANGUAGE TO BE ADDED FOR THE VIEWING OF THOSE TYPES OF FILES.

    Notepad++ has about 80 languages built-in – but that’s a drop in the bucket compared to the uncountable number of coding languages possible in the world. It will never be able to have all the languages that someone might want.

    Because the Developers know this, they provided the User Defined Language (UDL) system, whereby you can define as many custom languages as you want for Notepad++ using lists of keywords. So feel free to follow the UDL overview in the Online User Manual, plus the offsite UDL 2.1 guide that’s linked from the Languages > User Defined Language > Define Your Language… dialog, and add your language’s keywords and operators.

    The Community even has a Collection of User-submitted UDL where users can submit your UDL definition after you’ve finished creating it, and where you can check before you create the UDL for the language, to see if someone else has already created one.

    Looking through the list at the Collection, I see there’s a “Zebra Printing Language” which will show up in the Language menu as “ZPL”, so if you download that XML file and save it in %AppData%\Notepad++\userDefineLangs\ then restart Notepad++, you should see Language > ZPL in the bottom section of Notepad++'s Language menu – and that may or may not be the right language for you, depending on what you mean by “ZPL”.

  • Is it possible to change Document Map and Function List edge color?

    8
    0 Votes
    8 Posts
    780 Views
    tusken12T

    @Andi-Kiissel If “WindowFrame” isn’t in the reg address I mentioned, it might be possible to just add that reg key and make it work if it keeps giving you issues.

  • Notepad++ Cannot Print

    4
    0 Votes
    4 Posts
    397 Views
    Harold FuchsH

    @PeterJones Thank you for this. I used the “reg” command shown in that discussion and it worked. What surprised me was that I did not have to be admin to do it.

  • MIME Tools does not url encode commas?

    3
    0 Votes
    3 Posts
    621 Views
    guy038G

    Hello, @michael-levy, @peterjones and All,

    Some other characters are not %-encoded when using the The Plugins > MIME Tools > URL Encode option

    So, here is a simple regex S/R which will encode the remaining ASCII characters !

    SEARCH (!)|(\$)|(')|(\()|(\))|(\*)|(\+)|(,)|(-)|(\.)|(_)

    REPLACE (?1%21)(?2%24)(?3%27)(?4%28)(?5%29)(?6%2A)(?7%2B)(?8%2C)(?9%2D)(?10%2E)(?11%5F)

    If you do NOT want to encode the _ char, use this S/R :

    SEARCH (!)|(\$)|(')|(\()|(\))|(\*)|(\+)|(,)|(-)|(\.)

    REPLACE (?1%21)(?2%24)(?3%27)(?4%28)(?5%29)(?6%2A)(?7%2B)(?8%2C)(?9%2D)(?10%2E)

    Best Regards,

    guy038