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

Modify headers' update behavior #25

Merged
merged 1 commit into from
Aug 4, 2017
Merged

Conversation

anchnk
Copy link
Contributor

@anchnk anchnk commented Aug 2, 2017

Closes #20

This patch modify existing behavior in order to update headers.

The plugin now loops through global options to see which ones are set in
$MYVIMRC from which a list is built. Then, it iterates over the list to
see if all headers are present from the start of the file to a certain
threshold (option g:header_max_size, default is 5).

If one required header is missing, it considers that headers aren't set
so it adds new ones. Otherwise, it updates headers keeping positions and
identations.

Patch also updates the README.md and CHANGELOG.md to reflect thoses
changes.

This patch modify existing behavior in order to update headers.

The plugin now loops through global options to see which ones are set in
$MYVIMRC from which a list is built. Then, it iterates over the list to
see if all headers are present from the start of the file to a certain
threshold (option g:header_max_size, default is 5).

If one required header is missing, it considers that headers aren't set
so it adds new ones. Otherwise, it updates headers keeping positions and
identations.

Patch also updates the README.md and CHANGELOG.md to reflect thoses
changes.
@alpertuna alpertuna merged commit e35149b into alpertuna:master Aug 4, 2017
@alpertuna
Copy link
Owner

Nice, thank you 👍

@anchnk anchnk deleted the diff-update branch August 4, 2017 12:33
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

Successfully merging this pull request may close these issues.

2 participants