【问题标题】:Configure sublime text 3 folder node_modules for node.js为 node.js 配置 sublime text 3 文件夹 node_modules
【发布时间】:2016-05-11 00:50:27
【问题描述】:

我需要侧边栏中的 node_modules 但在搜索文件时不需要“转到文件”。

如果我使用

{
  "folder_exclude_patterns": [ "node_modules"]
}

除了侧边栏外一切正常。

【问题讨论】:

    标签: node.js sublimetext3


    【解决方案1】:

    Sublime text -> Preferences -> Settings-> 打开一个新窗口,左侧是所有程序设置,右侧是您的用户设置。您可以在 {} 括号之间添加这一行 -

    "binary_file_patterns": [".svn/", ".git/", "node_modules/", "bower_components/"]
    

    【讨论】:

      【解决方案2】:

      你需要这个设置binary_file_pattern:

          // These files will still show up in the side bar, but won't be included in
          // Goto Anything or Find in Files
          "binary_file_patterns": ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip"],
      

      你也可以使用:

      // index_exclude_patterns indicate which files won't be indexed.
      "index_exclude_patterns": ["*.log"],
      

      它会在侧边栏中显示,但从任何索引中删除它。

      你也可以试试这个插件:https://github.com/titoBouzout/SideBarFolders

      对于某些用户..(我:P),ST项目系统太多了..我只是 希望能够在不保存或跟踪项目的情况下切换文件夹 文件,并保持 Tabs 完好无损。好吧,这个包就是这样做的。

      【讨论】:

      • 使用 sublime3、Linux、build 3126 尝试了不同的变体(“node_modules”、“node_modules/*”):不工作
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-25
      • 2021-01-08
      • 2018-04-17
      • 1970-01-01
      • 2017-07-16
      • 2014-04-14
      相关资源
      最近更新 更多