有没有办法在Komodo Edit中锁定文件?

时间:2013-12-22 09:36:17

标签: api locking file-permissions komodoedit

我们的团队使用ActiveState Komodo Edit编辑远程主机上的文件。是否有办法(如在VIM中)锁定文件进行编辑(如果已经打开进行编辑?)

1 个答案:

答案 0 :(得分:2)

使用宏来切换当前选项卡的只读模式:

// 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;
}

<强>参考