Code Monkey home page Code Monkey logo

Comments (8)

OBKoro1 avatar OBKoro1 commented on August 20, 2024

@ywshzh 请问有没有生成注释? 注释生成的效果是什么样子的。
PS: 一开始是可以生成注释的,然后添加了beforeAnnotation,就不能生成注释了?

from koro1fileheader.

ywshzh avatar ywshzh commented on August 20, 2024

注释都可以生成,只是beforeAnnotation得内容不行

'''
@author: shuyu.wu
@LastEditors: shuyu.wu
@description:
@Date: 2019-02-22 14:28:48
@LastEditTime: 2019-02-22 17:38:18
'''

from koro1fileheader.

OBKoro1 avatar OBKoro1 commented on August 20, 2024

@ywshzh
请问文件名是什么?后缀是不是.py结尾的?
文件路径是多少?
还有重启编辑器试一下?
重启不行的话,你试一下,设置一个这个配置,看能不能用?

from koro1fileheader.

ywshzh avatar ywshzh commented on August 20, 2024

@OBKoro1
文件名&文件路径:C:\Users\admin\Desktop\manage.py
已重启过无效
增加如下配置无效,且并未从第5行开始注释,始终是第一行开始:
"fileheader.configObj": {
"autoAdd": true, // 将该选项设置为true即可开启
"beforeAnnotation": {
"py": "#!/usr/bin/env python\n# -- coding: utf-8 --" // py文件默认,可修改
},
"py":5,
"autoAlready": false
}
vscode版本:1.31.1

from koro1fileheader.

OBKoro1 avatar OBKoro1 commented on August 20, 2024

设置错了,应该是这样:

"fileheader.configObj": {
 "headInsertLine": {
    "py": 5
  }
}

from koro1fileheader.

ywshzh avatar ywshzh commented on August 20, 2024

仍然不生效
"fileheader.configObj": {
"autoAdd": true, // 将该选项设置为true即可开启
"beforeAnnotation": {
"py": "#!/usr/bin/env python\n# -- coding: utf-8 --" // py文件默认,可修改
},
"headInsertLine": {
"py": 2
},
"autoAlready": true
}

from koro1fileheader.

OBKoro1 avatar OBKoro1 commented on August 20, 2024

@ywshzh 抱歉,没有解决问题。

采用你给的配置:

image

我可以正常生成注释(文件:test.py):

image

除了我用的mac,你用的window,其他环境/版本都是一样的。(至今没有出现过因为系统不同而导致的bug)

想了所有的情况,还是找不到问题在哪,你可以那边再排查一下,很可能是某处细节的问题

from koro1fileheader.

ywshzh avatar ywshzh commented on August 20, 2024

@OBKoro1
感谢迅速的支持,过几天我换台电脑试试

from koro1fileheader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.