On Thu, Apr 17, 2014 at 5:14 PM, Magnus Henkel wrote: > I'm writing a python script which starts MacVim as the editor for a couple of > files. These files will be scanned (and copied into other files) while they > are open. > The background processing for a certain file stops when it is closed manually. > > I'm trying to use the vim server capabilities, since obviously I don't want > to fire up the MacVim application several times. > > I discovered that there are (at least) two ways of starting MacVim and both > are not working correctly for me: > Using the path /Applications/MacVim.app/Contents/MacOS/MacVim from python > opens a white window without any content on top of the other window showing > the text file. It also starts up the application more than once and it keeps > opening white windows when more files are opened. > > Using the path /usr/bin/mvim doesn't show this behavior but it makes it more > awkward to track the process from python (that might be more python than vim > related). Using subprocess.call doesn't wait for the MacVim window of current > text file to be closed (as it should and it does with the other path). > > The subprocess.Popen records a PID which is not the one of the text file but > of some other vim "instance" (maybe it is the server, ps aux only shows > "(Vim)" and the text file opened previously gets another PID). > > I wonder if these issues are related to how the vim server starts up and if > there is a way to deal with the server in a more "clean" way. > > I have been posting a question related to the same problem on stackoverflow: > > http://stackoverflow.com/questions/23067612/python-cant-get-hold-of-real-process-id-with-subprocess
Check out ":h macvim-start". I *think* what you are looking for is: /Applications/MacVim.app/Contents/MacOS/Vim -fg Björn -- -- 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]. For more options, visit https://groups.google.com/d/optout.
