vim - 如何在 NerdTree 中通过 TypeScript 隐藏自动生成的文件?

标签 vim typescript nerdtree

我想在 NERDTree 中隐藏由 Typescript 转译器自动生成的文件 (.js .js.map)。

最佳答案

感谢 Hussein Nazzal,我设法以这种方式解决了它(因为我使用的是 Angular2,所以有几个步骤需要注意):

  • 以这种方式将 outDir 属性添加到 tsconfig.json:

    {
      "compilerOptions": {
        "target": "es5",
        "module": "system",
        "moduleResolution": "node",
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "removeComments": false,
        "noImplicitAny": false, 
        "outDir": "buildjs/"
      },
      "exclude": [
        "node_modules",
        "typings/main",
        "typings/main.d.ts"
      ]
    }
    
  • 然后在 .vimrc 文件中添加以下内容:

    let NERDTreeIgnore=['buildjs$']
    
  • 不要忘记修改 index.html 并在 System.import('buildjs/main') 附近添加以下行,

    System.import('app/main')`
    
  • 添加到 System.config

    map: {
      app: 'buildjs'
    }
    

关于vim - 如何在 NerdTree 中通过 TypeScript 隐藏自动生成的文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36247767/

相关文章:

node.js - 使用 Fastify 和 Nestjs 上传文件错误

javascript - 如何使用 namespace 导入而不导入所有内容?

vim - 新窗口中的 nerdtree textwidth

vim - 从 Cygwin 编译 vim (Versin>=7.4.399) 时显示错误 "collect2: error: ld returned 1 exit status"

vim - 是否可以使用新的 colorcolumn 选项在 vim 7.3 中(同时)使用不同颜色的颜色列?

Vim:猛拉和粘贴行并保持列位置

javascript - typescript 顺序数组基于另一个数组的值

vim - 如何自定义 NERDTree 行为

vim - 未知函数 : pathogen#infect

ubuntu - E185 : Cannot find color scheme solarized