Skip to content

write buffer before running :Neomake #237

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

Closed
wants to merge 1 commit into from
Closed

write buffer before running :Neomake #237

wants to merge 1 commit into from

Conversation

wizzup
Copy link

@wizzup wizzup commented Mar 15, 2017

To be able to ghcmod/hlint with single ,hc/,hl command without having to :w to write the buffer first.

@begriffs
Copy link
Owner

Hm, I'm worried that this might cause surprises. If someone believes that they can check the syntax of an unsaved buffer and it causes the file to be changed it might be worse than just failing to check. Can you remind me what the existing behavior is? Does it provide a clear message saying to save the file first?

@wizzup
Copy link
Author

wizzup commented Mar 16, 2017

Is there a way to check without saving first?

Maybe I stupidly missed something, when I want to run ,hc/,hl vim will give me warning that buffer is not saved and do nothing.

This change is the only solution I know to be able to run ghcmod/hlint within vim.

@begriffs
Copy link
Owner

I think you do have to save the file before ghc-mod will work. I usually save manually every so often and then use ghc-mod on the saved file. I guess it's kind of annoying but I got used to it. Doing an auto file save during linting seems unexpected, like I would be surprised if an IDE did that. Thoughts?

@wizzup
Copy link
Author

wizzup commented Mar 16, 2017

I do understand your point. Will close and this PR then.

@wizzup wizzup closed this Mar 16, 2017
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