Remove columns from a file
-
Hi, @laurent, @alan-kilborn and All,
When I talk about simplification, it’s a great big word !
I just meant that we could replace the two shortcuts
Alt + Shift+ Left
andAlt + Shift+ Right
withAlt + Left-mouse click
!Cheers,
guy038
-
@guy038 said in Remove columns from a file:
I just meant that we could replace the two shortcuts Alt + Shift+ Left and Alt + Shift+ Right with Alt + Left-mouse click !
Still too burdensome, if my hands are on the keyboard. :-)
But, in truth, I have a macro for those two combinations anyway plus Begin/End Select, tied to Shift+Ctrl+b.
Thus if I’m doing a normal Begin/End Select, I do two Ctrl+b, one at each end of my block.
But if I’m intending to do a column version of same, I start it with a Ctrl+b, move to my endpoint, and do Shift+Ctrl+b.Initially, I wanted it to be Shift+Alt+b instead, however, I found that combination will “ring the bell” on my machine, which I found very annoying. It seems to do this because “Alt” is involved. Does anyone know how to prevent this, if it doesn’t just happen to me?
-
@Alan-Kilborn said in Remove columns from a file:
I wanted it to be Shift+Alt+b instead, however, I found that combination will “ring the bell” on my machine
I believe it’s because in most Windows apps, including Notepad++, the
Alt+
letter orAlt+Shift+
letter will try to activate the menu with that accelerator value. If that accelerator doesn’t exist, then it will beep at you.However, when I map the Begin/End Selection to
Alt+B
and the Macro (Alt+Shift+RightArrow
,Alt+Shift+LeftArrow
,Being/End Selection
) toAlt+Shift+B
, theAlt+Shift+B
stops ringing the bell. -
@PeterJones said in Remove columns from a file:
when I map the Begin/End Selection to Alt+B and the Macro (Alt+Shift+RightArrow,Alt+Shift+LeftArrow,Being/End Selection) to Alt+Shift+B, the Alt+Shift+B stops ringing the bell.
That’s interesting.
Does that mean that somehow when invoking the Alt+Shift+b, it knows somehow that Alt+b is assigned to some function in Notepad++ (and thus is not an non-existent menu command)?I feel like I want to map Alt+b to nothing (SCI_NULL ?) just so the bell will not ring if I changed my macro to be Shift+Alt+b.
I certainly don’t want my Begin / End Select command mapped to Alt+b instead of Ctrl+b – after years of having it on Ctrl+b, it would be hard to get used to. Plus, in my mind, Alt+something IS for dropping a menu, unless combined with Shift as well. -
@Alan-Kilborn said in Remove columns from a file:
@PeterJones said in Remove columns from a file:
when I map the Begin/End Selection to Alt+B and the Macro (Alt+Shift+RightArrow,Alt+Shift+LeftArrow,Being/End Selection) to Alt+Shift+B, the Alt+Shift+B stops ringing the bell.
That’s interesting.
Does that mean that somehow when invoking the Alt+Shift+b, it knows somehow that Alt+b is assigned to some function in Notepad++ (and thus is not an non-existent menu command)?Nope. I unassigned Begin/End Selection, and left Alt+Shift+B on the macro, and Alt+Shift+B still didn’t ring the bell.
I also verified that using the macro to both Begin and End the column selection worked. Since I don’t have the years of training on Ctrl+B, I might just train myself to Alt+Shift+B for begin and end column selection. :-)
-
@PeterJones said in Remove columns from a file:
I also verified that using the macro to both Begin and End the column selection worked
I never thought of “starting” that way, but yes, it should and does work.
Nice one!Nope. I unassigned Begin/End Selection, and left Alt+Shift+B on the macro, and Alt+Shift+B still didn’t ring the bell.
Something sounds suspicious about this…
Does it remain after a restart? -
@Alan-Kilborn said in Remove columns from a file:
Something sounds suspicious about this…
Does it remain after a restart?It remains after a restart of Notepad++, yes.
I unzipped a fresh Notepad++, ran it, and verified that Alt+Shift+B beeps at me. Then I assigned the normal Begin/End Selection to Alt+Shift+B. From that moment on, it stopped beeping at me. Even if I restarted that fresh instance. If I go into a different program’s window (say, notepad.exe) and Alt+Shift+B, it will beep at me because of no such accelerator.
As far as I can tell, I don’t need to have ever assigned Alt+B to make Alt+Shift+B stop beeping.
Edit: and if I un-assign Alt+Shift+B in either instance of Notepad++, it starts beeping at me again.
-
Okay, I will have to do some more trials with the “beeping” thing…
While we’re on the topic of Begin/End Select … it is a great feature only missing one thing: Some type of visual indication that the “begin” has been done and the “end” is what is pending. Any agreement on that?
-
@Alan-Kilborn said in Remove columns from a file:
Any agreement on that?
++ I would be much more likely to train myself to use that feature – both in normal and column select modes – if I had such a status indicator.
Given that Scott recently updated the selection status section of the status bar, he might be convinced to add the Begin/End Selection state there, if someone were to suggest it to him.
-
My first thought was status bar as well, but in observing some of the “issue” discussion, there seems to be some opposition by the devs to ever altering what it shows.
I guess I mean by adding new fields; I have seen recent tweaks to the status bar for showing the current position – which is great for me as a PythonScript programmer, BTW – but some people have requested Zoom level on the status bar, which I find reasonable, and have been shot down, presumably because it would be a brand-new thing?
As an alternate to status bar, would it be reasonable to perhaps invert the colors of the line number margin, for example, in between “begin” and “end” select? I suppose not everyone has that margin turned on, although I find that unfathomable.
Uh oh, I think I just found a bug with Begin/End Select. It doesn’t restrict itself to the active tab – if you begin a select in one tab and end it in another, you get interesting results! :-)
-
Hello,@Laurent
Please try these steps, To Remove columns from a fileUse Alt+Shift+navigation keys, or Alt+Shift+click to do a block select of just that column. Then simply press Del.
I hope this information will be useful to you.
Thank you. -
-
I created two new feature requests relating to keybinding for begin/end select functionality, related to some of the above discussion:
-
Hi, @alan-kilborn,
Why didn’t you choose the
Alt + B
shortcut for theBegin/End Select
command, in your GitHub feature request ?It would match nicely with the
Alt + Shift + B
shortcut for your future macro !?BR
guy038
-
@guy038 said in Remove columns from a file:
Why didn’t you choose the Alt + B shortcut for the Begin/End Select command ?
It is a possible choice, certainly.
I didn’t choose it because to me, Alt + letter means I’m opening a main menu category, i.e., Alt+f drops the File menu, Alt+s drops the Search menu, etc.
And, if I have to press Alt, I usually have to “find the key”, whereas Shift and/or Ctrl are just more naturally located.
Actually, from long Notepad++ usage, Alt in combination with Shift – for column mode selecting – is an “easy find” as well. But Alt by itself is harder for me.
So if I’m going to make a feature request, I take advantage of that and suggest things that work well for me!