guiguan / file-header

FileHeader for Atom
https://atom.io/packages/file-header
Other
31 stars 21 forks source link

[Feature Request] Allow update of header without '@' #53

Open mjmaix opened 6 years ago

mjmaix commented 6 years ago

From https://github.com/guiguan/file-header/issues/52

Cannot make this template work since it does not have '@' on the lines

/* # ---------------------------------------------
# ---------------------------------------------
# Author: {{author}}
# Date:   {{create_time}}
# Last Modified by: {{last_modified_by}}
# Last Modified time: {{last_modified_time}}
# ---------------------------------------------
# --------------------------------------------- */

Thank you.

nasyxx commented 6 years ago

So, there I said why it does not automatically update.

julian-poidevin commented 6 years ago

It also doesn't work with '\' on the lines :

/**
 * \file    base_fpga_config.h
 * \brief   configuration file
 */

When using this kind of template, the header keeps being included on save : ezgif com-video-to-gif

nasyxx commented 6 years ago

Hi, I changed here and worked.

https://github.com/guiguan/file-header/blob/8d543ab57bae7e26ed5af92fe528c2eca3f65d9b/lib/file-header.coffee#L266

https://github.com/guiguan/file-header/blob/8d543ab57bae7e26ed5af92fe528c2eca3f65d9b/lib/file-header.coffee#L279

@julian-poidevin In addition to what I changed here, you still need to add :, or change [^:]+: in the source code to .+. But I am still not sure, due to I am not very familiar with regex.

julian-poidevin commented 6 years ago

Hey! In fact I forked your repo yesterday and made this modification myself (see fdcc6e064ce53aeba7115be176924aae9de4cbd9).

Thanks for the hint. 😄