我使用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提到了如何禁用扩展属性
defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1
但是._
文件仍然是在上面的defaults write
之后创建的。
是否有一种方法在使用sshfs + Textmate 2时禁用._
文件的创建?
发布于 2014-02-17 01:45:32
在Textmate 2中使用禁用扩展属性,使用:
defaults write com.macromates.TextMate.preview volumeSettings '{ "/Users/ohho/Mount/" = { extendedAttributes = 0; }; }'
其中/Users/ohho/Mount/
是我安装的所有sshfs文件夹的父文件夹。
发布于 2014-04-15 22:05:17
正如我尝试使用下面的命令一样,这是不起作用的:不起作用:-“缺省写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
(大多数网络文件系统),OS将创建一个带有点下划线前缀的辅助文件(例如._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 '{ "/net/“={ extendedAttributes = 0;};}‘
https://stackoverflow.com/questions/21825237
复制