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

Detect if file-header exist & update #1

Open
PezCoder opened this issue Oct 14, 2020 · 0 comments
Open

Detect if file-header exist & update #1

PezCoder opened this issue Oct 14, 2020 · 0 comments

Comments

@PezCoder
Copy link

PezCoder commented Oct 14, 2020

After looking for so long, found this which actually worked like how I wanted it to work. So thank you.!

Context

I'm using this to define a copyright statement & add it when launching :Header vim command

Question

Just one concern is that, I want to run :Header in some autocmd for certain file types & probably prewrite.
But on multiple runs of these commands keep adding the copyright header.

This may be more like a VIM question, but is there a way to detect the pattern that was specified to copyright & not add it, rather update/replace it in case it exists already?

@PezCoder PezCoder changed the title Detect if copyright exist & prevent executing Header command Detect if copyright exist & update Oct 14, 2020
@PezCoder PezCoder changed the title Detect if copyright exist & update Detect if file-header exist & update Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant