Skip to content

Instantly share code, notes, and snippets.

@renier
Created March 7, 2012 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save renier/1990621 to your computer and use it in GitHub Desktop.
Save renier/1990621 to your computer and use it in GitHub Desktop.
Komodo macro that replaces tabs with spaces
var scimoz = ko.views.manager.currentView.scimoz,
savedPos = scimoz.currentPos,
savedLinePos = scimoz.firstVisibleLine;
try {
scimoz.text = scimoz.text.replace(/\t/gm, " ");
scimoz.gotoPos(savedPos);
scimoz.lineScroll(0, savedLinePos-scimoz.firstVisibleLine);
} catch(e) {
return true;
}
return false;
@datamafia
Copy link

thx, worked great (komodo 8.5.4 on OSX)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment