![]() ![]() These commands seem to have Tab and Shift+Tab tied to them: I then use NppExec to add them to the Macro menu and then Shortcut Mapper to add the “Ctrl + Alt + ” shortcuts as did (note the OP’s request of “Ctrl + ” are already taken by SCI_PARAUP and SCI_PARADOWN respectively) ![]() SCI_SENDMSG SCI_GETLINEINDENTATION $(CURRENT_LINE) SCI_SENDMSG SCI_LINEFROMPOSITION $(MSG_RESULT) If multiple lines are selected and the cursor is anywhere either fully selecting the lines or in the middle of them somewhere - INDENT or UNINDENT ALL LINES - cursor may not stay in the current position, rather the highlighting is fully completed to all lines. Note if the cursor is in the preceding whitespace, indents are inserted at the far left margin, so the cursor shifts INDENT# of spaces with each insert. With only a single line either highlighted or cursor anywhere in the line - INDENT or UNINDENT - keeping the cursor where it was IF it was in the middle of the text somewhere. I’ve tested lots of cases and I think the following scripts work as I expect. However, with multiple lines selected and the cursor in the middle of one of them, the Edit => Indent => menu options work as expected - they only don’t work when you have a single line and the cursor in the middle. I liked MACRO, but like my scripts, if I had multiple lines selected, they only operated on the line where the cursor anchor point was. Not to beat a dead horse, but I updated my NppExec scripts. There’ s just a bit more logic in the unindent case so that we don’t keep changing the position if we’ve already unindented the line all the way it can be to the said in Change Indent Keyboard Shortcut?: ![]() NPP_MENUCOMMAND Edit\Indent\Decrease Line Indent NPP_MENUCOMMAND Edit\Indent\Increase Line Indent Said in Change Indent Keyboard you have NppExec, you can use the following script:Īssume you may want the reverse as well. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |