In the previous version of Bespin you were able to highlight a piece of text and upon hitting the “tab” key it would shift the text to the right and cause it to indent. However this feature is not available in the most recent version 0.7.1. Julian asked me to bring this feature back.
I started my work in the textview.js ; Where the code would belong for this type of action. I Looked for the function that got triggered when the “tab” key was pressed.

source:http://pastebin.com/bjTd8K0E
The original code adds the tab space but overwrites the selected text while doing so. To avoid this type of behaviour I appended the highlighted text (this.getSelectedCharacters() returns the highlighted characters) along with the tab space(str). This did the trick!
However while working on this bug I noticed a strange behaviour, every time you would hit the “tab” key, the focus went to the command line, which was very annoying. I had a feeling it was a bug and asked on #Bespin IRC channel. Patrick told me that it was Bug#555598 . After viewing the bug I noticed a patch had just been submitted, It just needed to be pulled. Next up is “Unindent”…um yeah at first I was like wth…Its when you hold shift + tab and everything gets indented to the left(notice the two arrows on your tab key:D).