我想通过NERDTree中的Typescript转换器隐藏自动生成的文件(.js .js.map)。
答案 0 :(得分:5)
感谢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'
}
答案 1 :(得分:2)
隐藏文件使用NERDTreeIgnore
let NERDTreeIgnore = ['\.js$' , '\.js.map$']
您的vimrc
文件
答案 2 :(得分:1)
如果您在NERDTree中键入I(大写i),则可以切换隐藏文件的可见性。
默认情况下隐藏文件将此行放在vimrc中:
let NERDTreeShowHidden=0