Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] File header docblock #643

Open
wutianjun5858 opened this issue Nov 1, 2023 · 1 comment
Open

[Feature request] File header docblock #643

wutianjun5858 opened this issue Nov 1, 2023 · 1 comment
Assignees
Labels
feature New feature or request

Comments

@wutianjun5858
Copy link

Can vim-doge create a file header? Does the file header contain author or even license? There are also typedef structures, etc.

@kkoomen
Copy link
Owner

kkoomen commented Nov 4, 2023

Hi,

Well, at first I'd say that this plugin simply does expressions, such as functions, classes, class properties etc, but I think it is an interesting idea. I do can make a command like DogeInsertBanner that inserts a file header at the top of the file (depending on the syntax per language and standards within that language), like so:

/**
 * <FILENAME>
 *
 * [TODO:description]
 *
 * @author     <NAME>
 * @copyright  <YEAR> <NAME>
 * @license    [TODO:license name]
 */

Then the user can configure certain properties in their vimrc:

" <NAME> replacement
let g:doge_header_name = "John Doe <johndoe@example.com>"

Tokens like <YEAR> and <FILENAME> can be generated by vim-doge. The above result would look like this:

/**
 * database.php
 *
 * Contains database helper functions
 *
 * @author     John Doe <johndoe@example.com>
 * @copyright  2023 <johndoe@example.com>
 * @license    MIT
 */

Then, the user can add more by themself if needed. Vim-doge simply provides the skeleton that is according to standards and contains information that are used by most people, so it should only contain the most commonly used info, such as author, copyright, license, name, description.

I can look at this soon, but this does require quite some research for all the languages that are currently provided by vim-doge.

@kkoomen kkoomen self-assigned this Nov 4, 2023
@kkoomen kkoomen added the feature New feature or request label Nov 4, 2023
@kkoomen kkoomen changed the title Can vim-doge create a file header? Does the file header contain author or even license? There are also typedef structures, etc. [Feature request] File header docblock Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants