# Select words without indentation in text editor

Currently you can select a line with the select_line command. The problem is that you select the complete line, with the indentations.

I'd like to know how I can select only the words of the current line, to integrate it in a pie please.

• It would be better if you had posted the relevant code along with the question. In case you have the selected line in a string call string.lstrip() to get rid of the leading whitespace. – stacker Jul 7 '15 at 15:11

def execute(self, context):