Thank you;  that makes sense!  I tried putting the file in  ~/.vim/ftplugin and 
it had no effect.  Could you suggest another place to try?

--David



> On Jul 8, 2023, at 11:28 PM, Yee Cheng Chin <[email protected]> wrote:
> 
> I think the reason why the article you linked to uses a ftplugin file in .vim 
> folder is to make sure it only gets set when you are editing a Markdown file. 
> Otherwise if you do it in your own vimrc it will be set for all file types 
> unless you explicitly uses a FileType auto-command to do the same thing. My 
> guess is that you put the file at the wrong place, which resulted in it not 
> being loaded in.
> 
> On Saturday, July 8, 2023 at 9:54:54 PM UTC-7 David Finton wrote:
>> Solved.
>> 
>> I looked for info on setting the variable makeprg in Vim.  In Vim, ":set mp" 
>> showed me that the makeprg variable was still set to its default value of 
>> "make". But I also realized that I could change that setting in my ~/_vimrc 
>> file, rather than in a script under the ".vim" folder.  
>> 
>> I used the same exact setting line from Rob Allen's article, but I used it 
>> to set the "makeprg" variable directly in my vimrc.  
>> 
>> Works like a charm.
>> 
>> 
>> On Tuesday, July 4, 2023 at 5:27:22 PM UTC-7 David Finton wrote:
>>> I found a simple recipe for configuring ".make" in MacVim to automatically 
>>> bring up Marked 2 for markdown rendering as I edit.  I can't get it to 
>>> work.  Perhaps there is a simpler way?
>>> 
>>> The recipe is from Rob Allen:  Use Vim's :make to preview markdown 
>>> <https://dzone.com/articles/use-vims-make-to-preview-markdown>
>>> 
>>> So I have the file ~/.vim/ftplugin/markdown.vim, and it contains the 
>>> following line:
>>> set makeprg=open\ -a\ Marked\\\ 2.app <http://2.app/>\ '%:p'
>>> 
>>> When I try ":make" in MacVim, it reports the following:
>>> 
>>> make: *** No targets specified and no makefile found.  Stop.
>>> 
>>> I can manually start Marked 2, and in Marked 2 find the file I'm editing 
>>> and open it, and that works.  But I would like to do this with a keystroke 
>>> from MacVim.  Rob Allen's page filled me with hope that this was possible 
>>> and easy.  Am I close?
>>> 
>>> Thanks!
> 
> 
> -- 
> -- 
> You received this message from the "vim_mac" 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 a topic in the Google 
> Groups "vim_mac" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/vim_mac/246RNCSsiyo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/vim_mac/3b27eef1-ac93-4217-a134-19ca8c8d930fn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/vim_mac/3b27eef1-ac93-4217-a134-19ca8c8d930fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
-- 
You received this message from the "vim_mac" 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_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_mac/51B3A150-DD9C-4A6B-A217-A0D2AFB7D5D6%40gmail.com.

Reply via email to