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

12 hours ago
Feb 20, 2017
@babobski
autocomplete on wrong screen when editing at end of line
3 days ago
Feb 18, 2017
@babobski

@TheodoreKrypton or you can use a different approach. For Firefox, Chrome, Safari and Opera there is a stylish addon available, this addon you can …

6 days ago
Feb 15, 2017
6 days ago
Feb 15, 2017
@babobski
  • @babobski db8b524
    Added Apache support to color-scheme
6 days ago
Feb 15, 2017