Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #standard modules
- import pn
- import scintilla
- ##
- # @brief Move selection to the right
- # @note Add ALT+Right Arrow Shortcut
- @script("Strafe Selection Right", "Text")
- def StrafeSelectionRight():
- sct = scintilla.Scintilla(pn.CurrentDoc())
- #pn.AddOutput("\n Selections:"+str(sct.SelectionCount))
- for i in range(sct.SelectionCount):
- (a, c) = (sct.GetSelectionNAnchor(i), sct.GetSelectionNCaret(i))
- sct.SetSelectionNAnchor (i, a+1)
- sct.SetSelectionNCaret (i, c+1)
- ##
- # @brief Move selection to the left
- # @note Add ALT+Left Arrow Shortcut
- @script("Strafe Selection Left", "Text")
- def StrafeSelectionLeft():
- sct = scintilla.Scintilla(pn.CurrentDoc())
- #pn.AddOutput("\n Selections:"+str(sct.SelectionCount))
- for i in range(sct.SelectionCount):
- (a, c) = (sct.GetSelectionNAnchor(i), sct.GetSelectionNCaret(i))
- sct.SetSelectionNAnchor (i, a-1)
- sct.SetSelectionNCaret (i, c-1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement