Change Indent Keyboard Shortcut?
-
@Alan-Kilborn said in Change Indent Keyboard Shortcut?:
I’m not much of a NppExec scripter, but I’m curious about what your scripts will do with those circumstances, so I may just try it out! :-)
My script basically looks at the selection and if it’s single line - it does some magic before calling the Edit=>Indent=>menu options. If it’s multiline selection, I just call the Edit=>Indent=>menu options.
I don’t fully grok the source code at your link, but if all that’s in there, I wonder if it may be an easy lift for a talented N++ developer to change the current simple menu code to sending SCI_TAB/BACKTAB to actually doing some logic about single / multiline selection and making the menu items “do what they say”.
Til then, I’m loving my scripts (since I’m actually editing Python right now with the exact troubleshooting use case I described above). Everything “looks like a nail” now to me I guess …
Cheers.
-
@Michael-Vincent said in Change Indent Keyboard Shortcut?:
I wonder if it may be an easy lift for a talented N++ developer to change the current simple menu code to sending SCI_TAB/BACKTAB to actually doing some logic about single / multiline selection and making the menu items “do what they say”.
That’s a good idea, but I quoted some “issue” links above on it, and it doesn’t appear they’ve generated enough interest for any of the talents to work on it.
-
This post is deleted! -
Oh wow, quite the topic I see.
I’m trying to get this to work but finding it a bit frustrating.
@Michael-Vincent, thank you so much for the plugin and the code!
I’m a novice at Notepad++ and coding and general. I’ve installed the plugin, but then I’m confused as to what to do next. Macro\Modify Shortcut/Delete Macro? Plugins\NppExec\Show Console…? Save the code into a dll file? (I’m not even sure how dll files work)… oh boy
-
@Cr8zy_Ivan said in Change Indent Keyboard Shortcut?:
I’m a novice at Notepad++ and coding and general. I’ve installed the plugin, but then I’m confused as to what to do next. Macro\Modify Shortcut/Delete Macro? Plugins\NppExec\Show Console…? Save the code into a dll file? (I’m not even sure how dll files work)… oh boy
Plugins=>NppExec=>Execute. In the window, paste one of the “scripts” without the name and save with that name instead:

Do the same for the other saving it as the other name.
Then, Plugins=>NppExec=> Advanced Options…

Add a name, select the script name you saved that matches and press the Add/Modify button. Make sure the “Place to the Macros submenu” at the top is checked.
Finally, open Setting=>Shortcut Mapper… and add the “Ctrl + Alt + [” shortcuts:

Cheers.
-
Wow, that’s so awesome. Thank you!
-
Here’s a weird condition…maybe:
Select one or more empty lines.
Press Tab.
Exactly nothing happens.My goal was to have leading whitespace inserted on all lines at once, for each press of the tab key.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login