Saturday, April 6, 2019

Re: :make behaviour

On Sun, Apr 7, 2019 at 2:50 AM Andrew Bernard <andrew.bernard@gmail.com> wrote:
>
> I am using gvim for lilypond work. Lilypond is an open source music engraving program, that compiles text source code into engraved music output.
>
> If I run :make in a buffer with a lilypond source file, say test.ly, vim runs
>
> :!lilypond "test" 2>&! | tee /tmp/vpcquUM/13
>
> [The tmp file name is irrelevant].
>
> The lilypond compiler program name is 'lilypond'.
>
> I want :make to run my makefile, not act like this. I am baffled as to how vim is picking up the lilypond compiler program name, and why :make does not simply run make. How deoes :make get the filename, also? I was unable to find documentation on that aspect.
>
> I have syntax highlighting for lilypond, but no other modules to assist with lilypond development.
>
> What is going on here?

The :make command runs whatever program is set in the 'makeprg'
global-local option. The default is "make" but it can be changed, even
changed separately for different files edited in parallel.

To see its current value and where it was set, type
:verbose setlocal makeprg?
followed by <Enter>

My guess (but it's just a guess) is that your so-called lilypond
"syntax" script includes statements (such as :setlocal statements or,
worse, :set statements) which rightly belong in a filetype-plugin
instead.

See
:help :make
:help 'makeprg'
:help :verbose
:help 'verbose'

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: