ivansafrin/Polycode — pull request #253 by TheCosmotect (2013-04-21 07:56:20+00:00)
Title: Added UITextInput::shiftText() & shortcuts, allowing blocks of text to be shifted left and right

This is a feature I use a lot in other code editors, so I thought I'd add it to Polycode. I also added some keyboard shortcuts to access this functionality. On Mac, just press cmd+] to shift right, and cmd+[ to shift left (I know Xcode and Sublime Text 2 use those shortcuts for that). You can shift single unselected lines or multiple selected lines. I haven't tested on Windows (or Linux), but I added a check for KEY_LCTRL or KEY_RCTRL.

I'd characterize this as an initial implementation. I'll probably work on it some more later on, or someone else can improve on it. Right now, the spacing is done by inserting tabs. I've got some TODOs in there that will allow the user to convert between tabs and spaces eventually (Sublime Text 2 has a similar feature).