Select text fragment. In Advanced submenu of Edit menu click Tabify selected lines. The spaces in selected text will be replaced with tabs.