V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
eggt
V2EX  ›  问与答

vscdoe 有没有创建文件时,自动生成 shebang 的功能啊?

  •  
  •   eggt · 44 天前 · 846 次点击
    这是一个创建于 44 天前的主题,其中的信息可能已经有所发展或是发生改变。
    以前用 pycharm 是有的,还能配置变量自动获取时间,项目等挺方便好用。最近切到 vscdoe 却没有比较好的支持这个的,看了几个扩展和 snipp ,似乎都有问题,会影响正常编码
    7 条回复    2024-07-25 16:23:09 +08:00
    anubu
        1
    anubu  
       44 天前
    用过一个自动生成文件头部注释的扩展,可以尝试一下。https://github.com/OBKoro1/koro1FileHeader
    eggt
        2
    eggt  
    OP
       44 天前
    @anubu 这个只是注释吧,不是 shebang
    sastar
        3
    sastar  
       44 天前
    @eggt 第一次知道这个叫 shebang😂。看看这个插件是否符合你的要求 https://marketplace.visualstudio.com/items?itemName=rpinski.shebang-snippets
    eggt
        4
    eggt  
    OP
       44 天前
    @sastar 首先就看到了这个,这个不行,py 里面写注释时都能调用出来
    455c4l811WjPy37n
        5
    455c4l811WjPy37n  
       44 天前
    shebang ? 这是啥?
    DOLLOR
        6
    DOLLOR  
       44 天前
    其实你可以自己写 snippet ,vscode 的 snippet 就支持变量:
    https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variables
    eggt
        7
    eggt  
    OP
       44 天前
    @DOLLOR snip 影响写注释
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1179 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 00:00 · PVG 08:00 · LAX 17:00 · JFK 20:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.