How to hide autogenerated files using TypeScript in NerdTree?

I want to hide automatically generated files (.js.js.map) with the Typescript translator in NERDTree.

+5
source share
3 answers

Thanks to Hussein Nazzal, I was able to solve this problem (because I use Angular2 there are a few steps you need to know):

  • Add the outDir property to tsconfig.json as follows:

    { "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" ] } 
  • Then in the .vimrc file add the following:

     let NERDTreeIgnore=['buildjs$'] 
  • Remember to change index.html and add the following line next to System.import('buildjs/main') ,

     System.import('app/main')` 
  • add to System.config

     map: { app: 'buildjs' } 
+4
source

to hide files use NERDTreeIgnore

 let NERDTreeIgnore = ['\.js$' , '\.js.map$'] 

in your vimrc file

The following line should be used:
+2
source

If you type i (uppercase i) in NERDTree, you can switch the visibility of hidden files.

To hide the default files, put this line in your vimrc:

 let NERDTreeShowHidden=0 
+1
source

Source: https://habr.com/ru/post/1245855/


All Articles