2014-02-17 85 views
0

我使用Textmate 2通過sshfs在遠程Linux服務器上編輯rails項目。如何防止._(點下劃線)文件?

當我保存的文件(例如README.rdoc)有(即._README.rdoc)創造了另一個文件:

-rw-rw-r-- 1 4096 Feb 17 17:19 ._README.rdoc 
-rw-rw-r-- 1 486 Feb 17 17:19 README.rdoc 

從TextMate的文檔提到how to disable extended attributes

defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1 

._文件後,仍然產生以上defaults write

當使用sshfs + Textmate 2時,是否有辦法禁用創建._文件?

回答

3

To disable Extended Attributes在TextMate中2,用途:

defaults write com.macromates.TextMate.preview volumeSettings '{ "/Users/ohho/Mount/" = { extendedAttributes = 0; }; }' 

哪裏/Users/ohho/Mount/是我所有的SSHFS的父文件夾安裝文件夾。

0

正如我與下面的命令這是行不通的嘗試: 不工作: - 「默認寫com.macromates.textmate OakDocumentDisableFSMetaData 1」

I have taken reference from : 

https://github.com/textmate/textmate/wiki/Hidden-Settings 和現在工作的罰款。

TextMate use extended attributes to store caret position, etc. 

On file systems which don’t support extended attributes 

(大多數網絡文件系統),Mac OS X將創建一個輔助文件與 的點下劃線前綴(例如._filename)。

If you don’t want these files, you can disable the use of extended 

屬性。這是目前用volumeSettings鍵控制的。其值是(1)帶有路徑前綴的關聯數組;和(2)具有該路徑設置的另一個關聯數組。 (目前,只有extendedAttributes 被支持。)

So, if we wanted to disable extended attributes for files under /net/: 

默認寫com.macromates.TextMate.preview volumeSettings「{ 「/淨/」= {extendedAttributes = 0; }; }'