Babobski
Bob de Haas

Komodo Userscripts

var currentView = ko.views.manager.currentView;

if (currentView === undefined) {
    return false;
}

var scimoz = currentView.scimoz;
var selection = scimoz.selText;
var remove    = selection.length;
var currentPos = scimoz.currentPos;
var startPos = currentPos - remove;

if (selection.length == 0) {
    return false;
}

scimoz.setSel(startPos, currentPos);

var result = '<? ' + selection + ' ?>';

scimoz.replaceSel(result, selection);

copy

var currentView = ko.views.manager.currentView;

if (currentView === undefined) {
    return false;
}

var scimoz = currentView.scimoz;

currentView.setFocus();

currentView.scimoz.beginUndoAction()
try {
    scimoz.lineCopy();
    scimoz.newLine();
    scimoz.paste();
    scimoz.deleteBack();
    scimoz.homeDisplay();
    scimoz.wordLeft();
    scimoz.wordRight();
    scimoz.insertText(scimoz.currentPos, '-webkit-');
    scimoz.lineEnd();
} finally {
    currentView.scimoz.endUndoAction()
}

copy

var currentView = ko.views.manager.currentView;

if (currentView === undefined) {
    return false;
}

var scimoz = currentView.scimoz;
var selection = scimoz.selText;

if (selection.length == 0) {
    return false;
}
selection = selection.replace(/\s*/g, '_');

var result = selection.replace(/[^a-z0-9]/gi, '');

scimoz.replaceSel(result.toLowerCase());

copy

var currentView = ko.views.manager.currentView;

if (currentView === undefined) {
    return false;
}

var scimoz = ko.views.manager.currentView.scimoz;
var selection = scimoz.selText;

if (selection.length == 0) {
    return false;
}

if (/\\'/.test(selection)) {
    var result = selection.replace(/\\'/g, '\'');
} else {
    var result = selection.replace(/'/g, '\\\'');
}

scimoz.replaceSel(result, selection);

copy
ko.commands.doCommand('cmd_newWindow');
copy
var koDoc = (komodo.koDoc === undefined ? komodo.document : komodo.koDoc);

if (koDoc === undefined) {
	return false;
}

var content = koDoc.buffer;
var result = content.replace(/<!--[^>]+>/g, '');
    //result = result.replace(/\/\/[^\r\n]*/g, '');

koDoc.buffer = result;
copy

var currentView = ko.views.manager.currentView;

if (currentView === undefined) {
    return false;
}

var scimoz = currentView.scimoz;
var selection = ko.interpolate.getWordUnderCursor();
var remove    = selection.length;
var currentPos = scimoz.currentPos;
var startPos = currentPos - remove;

if (selection.length == 0) {
    return false;
}

if (/\$/.test(selection)) {
    var result = selection.replace('$', '');
} else {
    var result = '$' + selection;
}

scimoz.setSel(startPos, currentPos);

scimoz.replaceSel(result, selection);

copy

Github

23 days ago
May 1, 2017
@babobski
Not compatible with Komodo Edit 8.5.4
23 days ago
May 1, 2017
@babobski

@bellingboe the latest release of the Sass compiler, is only compatible with Komodo X. There where some changes that made it pretty hard to still s…

24 days ago
Apr 30, 2017
@babobski
Dont show notification if not in sass/sccs file
24 days ago
Apr 30, 2017
@babobski

fixed in the latest release

24 days ago
Apr 30, 2017