Javascript

变量作用域

作用域类型

  • 全局 Global Scopes

    • let 不属于 window
    • undefined 属于 window
    • var 声明 属于 window
  • 局部 Local Scopes

    • 函数 Function Scopes
    • 块 Block Scopes

      • 使用 let 或者 const
    • let 声明普通变量
    • const 声明“引用”不便类型

Projectile Notes

重新生成 项目 cache

  • 调用函数 M-x projectile-invalidate-cache

忽略文件问题

https://docs.projectile.mx/projectile/2.2/projects.html#ignoring-files

  • 使用 .projectile 配置
  • 或者 设置变量

    • projectile-globally-ignored-files
    • projectile-globally-ignored-directiories

.projectile 文件配置

只包含的文件夹 "+"

  • 注意

    • "+" 后面只能跟目录
    • 对文件使用无效
1
2
+/src/foo
+/tests/foo

忽略的文件 或者 文件夹 "-"

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 文件夹
-/log
-/tmp
-/vendor
-/public/uploads


# 文件
-tmp
-*.rb
-*.yml
-models
  • 注意

WSL Notes

工具收集

访问 windows 网络文件

可以使用的方法

  • mount -t drvfs

    1
    2
    3
    4
    
    sudo mount -t drvfs '\\server\share' /mnt/share
    sudo mount -t drvfs '\\freenas\public' /mnt/freenas
    
    sudo mkdir -p /mnt/wsl/ubuntu && sudo mount -t drvfs '\\wsl$\Ubuntu-20.04' /mnt/wsl/ubuntu

无效方法

mklink 法

  • 在 windows 中 mklink /D \\server\share d:\share
  • 再在 wsl 中 访问 /mnt/d/share
  • 原因