2

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?

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
rlib
  • 7,444
  • 3
  • 32
  • 40

1 Answers1

2

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

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265