一些 sublime 包和默认设置在哪里? [英] Where do some sublime packages and default settings go?

查看:104
本文介绍了一些 sublime 包和默认设置在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时我会安装一个新的 sublime 包,并且会在 /Users/max/Library/Application Support/Sublime Text 3/Packages 目录中添加一个新目录,我喜欢这个目录,因为我可以使用使用

Sometimes I install a new sublime package and a new directory gets added to the /Users/max/Library/Application Support/Sublime Text 3/Packages directory, which I like because I can use a bookmark with FuzzyFileNav and quickly browse the default .sublime-settings and .sublime-key files to get my bearings about what is going on with this package. However sometimes there is no entry added, as shown below (ironically with FuzzyFileNav)

那么我找到 .sublime-settings.sublime-keymap 文件的方法是使用 sublime 中的下拉菜单,如下所示:

So then the way I would find the .sublime-settings and .sublime-keymap files is to use the dropdown menu in sublime also shown below:

我想知道的是:

  1. 为什么有些包会向我的 Packages 目录添加条目,而有些则不会?
  2. 如果 Packages 中没有条目,那么特定于包的 .sublime-settings.sublime-keymap 文件在哪里存在?
  1. Why do some packages add entries to my Packages directory and other don't?
  2. If there is no entry in Packages then where do the package specific .sublime-settings and .sublime-keymap files live?

我的主要目标是能够在我的用户和默认设置之间快速导航,但是当我感觉像 Hansel 并想知道所有文件都去哪里时,这会变得很困难......你知道的 :)

My main goal is to be able to quickly navigate between my User and Default settings but it makes it hard when I'm feeling like Hansel and wondering where'd all the files go...you know :)

一种可行的解决方法是复制所有不在 Packages 目录中的默认 .sublime-settings.sublime-keymap 文件并将它们放在在用户目录中并将它们重命名为 PackageName.sublime-settingsPackageName.sublime-keymap 然后我就可以浏览它们了,因为我还有一个书签给用户.我认为这会起作用,因为它会用所有完全相同的设置覆盖所有默认设置(位于某处).或者也许我可以做同样的事情,除了将文件放在默认目录中;但是,根据我一直在阅读的内容,修改默认目录是错误的.显然,最理想的做法是弄清楚这些文件到底在哪里.

One workaround that might work is to copy all the Default .sublime-settings and .sublime-keymap files that don't live in the Packages directory and put them in the User directory and rename them to PackageName.sublime-settings and PackageName.sublime-keymap and then I'll be able to browse them anyways because I also have a bookmark to User. I think that would work because it would overwrite all the Default settings (that live somewhere) with all the exact same settings. Or maybe I could do that same thing except put the files in the Default directory; however, from what I've been reading it's bad form to modify the Default directory. Obviously the most ideal thing would be to just figure out where the heck these files are.

推荐答案

Sublime Text 对不同种类的包使用不同的文件夹位置.例如,所有打包文件都安装到 Installed Packages 中,并且使用文件扩展名 .sublime-package 独立包含在标准 Zip 文件中.当包中包含文件 .no-sublime-package 时,该包将被提取.所有提取的包都存储在 Packages 文件夹中.

Sublime Text uses different folder locations for different kinds of packages. For instance, all packaged files install to Installed Packages and are self-contained in a standard Zip file using the file extension .sublime-package. When a package includes a file .no-sublime-package, the package will be extracted. All extracted packages are stored in the Packages folder.

设置和键盘映射存储在打包和未打包的包中.这些可以通过将它们保存到 Packages/User 来否决/扩展.

Settings and keymaps are stored within both packed and unpacked packages. Those can be overruled/extended by saving them to Packages/User.

有关包位置和层次结构的详细信息可以在包控制文档中找到.

Detailed information on package locations and hierarchy can be found in the Package Control documentation.

这篇关于一些 sublime 包和默认设置在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆