Is there a way to lock a file in Komodo Edit?

223 views Asked by At

Our team uses ActiveState Komodo Edit to edit files on remote hosts. Is there a way (like in VIM) to lock a file for editing if it is already opened for editing?

1

There are 1 answers

0
Paul Sweatte On

Use a macro to toggle readonly mode for the current tab:

// Toggle colouring of and readonly on current tab
var view = ko.views.manager.currentView;
var scimoz = view.scimoz;
var tab = view.parentNode._tab;
if (tab.style.backgroundColor) {
    tab.style.cssText = "outline-color: -moz-use-text-color; outline-style: none; outline-width: medium;";
    if (scimoz.readOnly) scimoz.readOnly = false;
}  else {
    tab.style.cssText = "background: #FF8080;";
    scimoz.readOnly = true;
}

References