Giter Site home page Giter Site logo

Comments (14)

alankilborn avatar alankilborn commented on May 30, 2024 1

For users that desire some alternative functionality to how the toolbar button works, you can create some macro(s) and bind them to keycombo(s) for quick access.

For example, here are two possible macros (that could be added into shortcuts.xml):

    <Macro name="View ShowSymbol: show eol and control chars" Ctrl="no" Alt="no" Shift="no" Key="0">
        <Action type="2" message="0" wParam="44019" lParam="0" sParam="toggle ShowAllChars (cannot know which state it is in after this)" />
        <Action type="2" message="0" wParam="44025" lParam="0" sParam="toggle ShowSpaceAndTab; this will definitely uncheckmark ShowAllChars" />
        <Action type="2" message="0" wParam="44019" lParam="0" sParam="checkmark ShowAllChars (and all others will become checkmarked too)" />
        <Action type="2" message="0" wParam="44019" lParam="0" sParam="uncheckmark ShowAllChars (and all others will become uncheckmarked too)" />
        <Action type="2" message="0" wParam="44026" lParam="0" sParam="checkmark ShowEndOfLine" />
        <Action type="2" message="0" wParam="44131" lParam="0" sParam="checkmark ShowControlChars" />
    </Macro>
    <Macro name="View ShowSymbol: show everything except eol" Ctrl="no" Alt="no" Shift="no" Key="0">
        <Action type="2" message="0" wParam="44019" lParam="0" sParam="toggle ShowAllChars (cannot know which state it is in after this)" />
        <Action type="2" message="0" wParam="44025" lParam="0" sParam="toggle ShowSpaceAndTab; this will definitely uncheckmark ShowAllChars" />
        <Action type="2" message="0" wParam="44019" lParam="0" sParam="checkmark ShowAllChars (and all others will become checkmarked too)" />
        <Action type="2" message="0" wParam="44026" lParam="0" sParam="uncheckmark ShowEndOfLine" />
    </Macro>

Some notes on the macros:

  • As sParam is unused for these commands, I've used it to embed some comments about the steps in the macros.

  • The first 3 actions in the macros are the same; after these 3 actions it is guaranteed that all of the View > Show Symbol choices are checkmarked. Macro logic can then continue from there to set or clear the various choices.

  • I haven't bound any keycombos to these macros; that would be up to the user to decide on keycombos and then set that up.

Here are the command ids for the possible commands:

  • Show Space and Tab : 44025
  • Show End of Line : 44026
  • Show Non-Printing Characters : 44130
  • Show Control Characters & Unicode EOL : 44131

from notepad-plus-plus.

alankilborn avatar alankilborn commented on May 30, 2024

Notepad++ is a text editor, not a true hex editor.
Suggest you use a hex editor for work with non-text files.

from notepad-plus-plus.

u07 avatar u07 commented on May 30, 2024

I used to work with it like this, it's been fine for ages. It pretty much is hex- or whatever- super-duper multi editor)

Actually, I think, I found the problem. What is this param ccShow="No"? Where is it in the config window? It seems not available via GUI. Although, in my setup (after update) it is NO. And in a fresh new install it is YES. And when it's YES, the problem is gone

from notepad-plus-plus.

u07 avatar u07 commented on May 30, 2024

image

from notepad-plus-plus.

alankilborn avatar alankilborn commented on May 30, 2024

ccShow

Probably relating to one of these:

image


It pretty much is hex- or whatever- super-duper multi editor

If you don't have NUL in your data, it is "pretty much ok".
But... you do have NUL in there, so, a lot of Notepad++ editing actions will not work correctly. You're playing with fire. Good luck to not get burned.

from notepad-plus-plus.

u07 avatar u07 commented on May 30, 2024

Ah, I see.. it's linked with this button now. It's behaviour is inconsistent, it has 3 states instead of 2. By default CCs are enabled, button is Off. Then you click it and it's On - CCs are still enabled. Then you declick it and CCs are gone.

I can't remember, was it the default behaviour in previous versions? This button used to (?) disable spaces and tabs only, not CCs.

image

image

image

from notepad-plus-plus.

u07 avatar u07 commented on May 30, 2024

Similar issue: #13988

from notepad-plus-plus.

alankilborn avatar alankilborn commented on May 30, 2024

As you point out, 13988 is a similar issue. I'd forgotten about that one.

Regarding the ¶ toolbar button, it is intended to be an "all on" or "all off" control.
If the button is in the depressed/on state (visually), you can be sure it is showing the maximum that can be shown.
However, if it is in the non-depressed/off state, it might not be the minimum (all off), but it definitely isn't the maximum (all on).
If you exclusively use the toolbar button for control, however, you can be sure that it is all-on or all-off.
(it isn't the most obvious behavior)

from notepad-plus-plus.

alankilborn avatar alankilborn commented on May 30, 2024

Regarding the ¶ toolbar button

More information regarding this button was added to the user manual: https://github.com/notepad-plus-plus/npp-usermanual/pull/646/commits

from notepad-plus-plus.

u07 avatar u07 commented on May 30, 2024

I got your idea. But still believe it's a wrong approach. That's why:

  • First, in other editors same button is normally used for displaying invisible characters only. Like, tabs, spaces and paragraphs. The icon itself represents the paragraph symbol. Look at MS Word: disarmed btn & visible CCs:

image

  • Second, the behaviour of this button was different in previous versions of NPP. It used to work as you expected it to work based on your experience with any other editor. See:

output

  • Third, showing TABs ans spaces is a more essential and popular function than hiding CCs. Normally you don't have CCs in your document, and if you have, you probably need them visible.

I believe that the behaviour of the button was changed unintentionally. Someone added a new functionality allowing user to hide control characters. And he placed it into the submenu that was controlled by that button. So the button got this new function. As there's a bug related to that change, it may prove me right, the programmer just did it without noticing this hidden impact. At least I haven't found any related discussions.

from notepad-plus-plus.

alankilborn avatar alankilborn commented on May 30, 2024
  • Second, the behaviour of this button was different in previous versions of NPP. It used to work as you expected it to work based on your experience with any other editor. See:

I see what is happening for you in your animated screen capture in your "Second" bullet point.
Unfortunately, when I attempt to reproduce that behavior, I can't.
For me, when the toolbar button is shown in the depressed state, I see all of the inverse video characters.
When it is in the not-depressed state, I see none of the inverse video characters.
For me, I am obtaining "correct" behavior, so, sorry, I can't be of more help on that aspect -- maybe someone else?

from notepad-plus-plus.

u07 avatar u07 commented on May 30, 2024

when I attempt to reproduce that behavior, I can't

Of course, you can't. That is classic NPP behaviour from previous versions (v6 will do). It used to work like that from the beginning of the project. But it changed recently when that new menu item was added.

from notepad-plus-plus.

u07 avatar u07 commented on May 30, 2024

Btw, here is the commit: 0cad36d , April 11 2023 by @ozone10 .

Long story short: donho decided (#13324) to change the "Show All Characters" button behaviour...

Now there is a quick way to DISABLE CCs with the "Show All Characters" button. But to ENABLE them back you have to go to a menu and then a submenu. And yeah, you'll have to google it first:

image

from notepad-plus-plus.

alankilborn avatar alankilborn commented on May 30, 2024

Of course, you can't. That is classic NPP behaviour from previous versions (v6 will do)

Ah, I misunderstood.

Anyway, the behavior is 8.6.4 (of the button) is as the developers desire. And it's fine with me as well. Not sure how many users would be on your side (impossible to know, unless they comment here).

from notepad-plus-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.