home *** CD-ROM | disk | FTP | other *** search
- !!Script
-
- /**
- @Tool: replaceSpacesWithTabs~replaces spaces with tabs for all
- indented lines. This script can be used to replace spaces
- in files opened without conversion of spaces to tabs.
- @EndTool:
- @Summary: replaceSpacesWithTabs~replaces spaces with tabs
- */
-
- function DoCommand()
- {
- var editor = getActiveEditor();
- if (editor)
- {
- var lineCount = editor.getLineCount();
- for (var i = 0; i < lineCount; i++)
- {
- var indentLevel = editor.getIndentLevel(i);
- editor.setIndentLevel(i, indentLevel);
- }
- editor.setActive("Replace spaces with tabs");
- }
- }
-
- !!/Script
-
-