Code Monkey home page Code Monkey logo

fileheadercomment's People

Contributors

doi avatar isuda avatar rcabg avatar victorird avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fileheadercomment's Issues

Feature Request : filename variable

I started using FileHeaderComment extension, and I figured something's missing for the current template I use : ${filename} variable.

If I find a bit of time, I'll check how extensions are made to implement it myself and send a PR.

Specific date and time format?

Is possible create own date time format? I would like to use this format:

dd.mm.YYYY hh:ii:ss

In curent version is not possible :(

Triple quote header

is it possible to do triple quote headers in python?

This:
"""
Created on Tue Jul 11 2023

Copyright (c) 2023 Your company
Author
"""
instead of:

#
# Created on Tue Jul 11 2023
#
# Copyright (c) 2023 Your company
# Author

Does not support py file comment style

I have python files.
I need to add headers to it.
Following is my settings for the extensions:

   "fileHeaderComment.parameter":{
        "*":{
            // "commentbegin": "/*",
            // "commentprefix": " *",
            // "commentend": " */",
            "company": "My Company.",
            "license_text" : [  "Contains trade secrets of My Company",
                "Copyright notice does not imply publication.",
                "Decompilation or disassembly of this software is strictly prohibited."]
        }
    },
    "fileHeaderComment.template":{
        "*":[
            "${commentbegin}",
            "${commentprefix} Copyright: ${company}, ${year}. All rights reserved.",
            "${commentprefix} ${license_text}",
            "${commentend}"
        ]
    }

On running the command the format of comment added is as follows:

'''
� Copyright: My Company, 2020. All rights reserved.
� Contains trade secrets of My Company.
�Copyright notice does not imply publication.
�Decompilation or disassembly of this software is strictly prohibited.
'''

The comments are written as strings.

Default header incorrect

I've installed the extension and configured the template like this
"fileHeaderComment.parameter": { "*": { "comment": "//", "company": "My company", "license": [ "${comment} Licensed under the Apache License, Version 2.0 (the \"License\");", "${comment} you may not use this file except in compliance with the License.", "${comment} You may obtain a copy of the License at", "${comment}", "${comment} http://www.apache.org/licenses/LICENSE-2.0", "${comment}", "${comment} Unless required by applicable law or agreed to in writing, software", "${comment} distributed under the License is distributed on an \"AS IS\" BASIS,", "${comment} WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", "${comment} See the License for the specific language governing permissions and", "${comment} limitations under the License." ] } }, "fileHeaderComment.template": { "*" : [ "${comment} Copyright ${year} ${company}", "${comment}", "${license}", "" ] }

However when i insert the template in any file it shows up like this
`// Copyright 2019 My company
//
// Licensed under the Apache License, Version 2.0 (the "License");
*// you may not use this file except in compliance with the License.
*// You may obtain a copy of the License at
*//
*// http://www.apache.org/licenses/LICENSE-2.0
*//
*// Unless required by applicable law or agreed to in writing, software
*// distributed under the License is distributed on an "AS IS" BASIS,
*// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*// See the License for the specific language governing permissions and
*// limitations under the License.

`

It adds a * on the license lines and i don't know why. There's something i suppose to do to remove this?

Enhancement: Replace the existing comment with the new.

The feature is to replace the existing copyright header with the new.

This is because, if the file is changed, the timestamp in the copyright comments should get updated. It is manual task to select and delete the comment and then update it with the new.

Limitation: The comments created using the plugin can only be replaced. Not other.

[FR] filenameNoExtension Parameter

Hey,

I would really like to have a parameter that does not include the file extension.

For example:
filename: vincent.txt
filenameNoExtension: vincent

Own placeholder?

This extension could to support placeholders like native snippets? Because I want to comment each file header which is inserted by own comment.

`/* ${1:myComment} ${datetime} ${author} */ ${0}

Steps:

  1. I put this file header template
  2. cursor is started on first placeholder, i write something
  3. tab action , im on end of this comment

Finish, continue in work ...

Its possible to do that?

Im using this extension because snippets in VSC does not support date/time/datetime variables.

Overwriting the auto-generated package and class descriptions

When creating new .java files and setting "autoHeader" to "autoSave", the correct header auto-populates at the top of the new file, but the package identifier ("package com.etc.etc") and class declaration ("public class Class") gets overwritten. Is there a way to auto-generate the headers above the regularly auto-generated content without completely overwriting it? Thanks!

Is it possible to add header for multiple files at a time?

Please let me know if anybody has tried adding the header to multiple files using some setting.
For eg. For multiple ts file at a particular position header should get added.
Please help me to configure this for VS code Editor.

Thanks in advance,
Nilam.

date time use urc

Hi.
The inserted date and time are using UTC timezone, is there a simple way to use CST?

I have set my linux date command to display CST time. But it still not work for this ext.

Workspace Settings

It would be really nice if there was a way to add parameters in the workspace settings (think for the like "product name" or something that was going to be specific to a git repo but the format might be universal

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.