Nigel Green | 24 Jan 12:30 2008

Re: Edit in MacVim


Hi there,

I'm new to the group, found you through a search to find if I could  
get an Input Manager to work with Vim. Now happily using MacVim, and  
eager to get my old TextMate tric working with "Edit in MacVim".

I ran the instructions as quoted below but nothing happened. However,  
when I had mounted the disk image for the input manager again, the  
command ran, but trying to launch the copy of Vim which is in the disk  
image with the Input Manager. Unmounting the disk image renders the  
plug-in inoperative again.

I have had a look in the InputManager package, but presume the actual  
code that launches the app is in the binary file?

Hope that helps shed some light.

Nigel

> - Download the latest MacVim, we used snapshot 0712B. Install to the /
> Applications directory. Open it.
>
> - Download and mount the disk image from http://slashpunt.org/vim/index.php?n=Main.Download
>
> - From the Terminal, do:
> defaults write org.slashpunt.edit_in_odbeditor
> ODBEditorBundleIdentifier "org.vim.MacVim"
> defaults write org.slashpunt.edit_in_odbeditor ODBEditorName MacVim
> sudo mkdir /Library/InputManagers
(Continue reading)

Nico Weber | 24 Jan 12:46 2008
Picon
Picon

Re: Edit in MacVim


>> Myself and a few other guys are curious on how you got Edit in Vim
>> working in MacVim, if you could post how to to in a reply back I'll
>> put it up or you put it up http://tinyurl.com/3xntp3 , that'd be
>> awesome.
>
> I tried it again on my colleague's computer and it worked immediately,
> so I don't understand why it's not working for other people. For
> reference, here's exactly what we did:

These instructions worked for me (10.5.1), thanks :-)

> - Download the latest MacVim, we used snapshot 0712B. Install to the /
> Applications directory. Open it.

I have MacVim in /Application/some/subdirectory, works fine as well.

> - From the Terminal, do:
> defaults write org.slashpunt.edit_in_odbeditor
> ODBEditorBundleIdentifier "org.vim.MacVim"
> defaults write org.slashpunt.edit_in_odbeditor ODBEditorName MacVim

My "normal" user doesn't have admin rights. In this case, the two  
lines above have to be done as "normal" user.

> sudo mkdir /Library/InputManagers
> sudo cp -pR "/Volumes/Vim/Edit in ODBEditor" /Library/InputManagers
> sudo chown -R root:admin /Library/InputManagers

These three have to be done as admin.
(Continue reading)

Bruno De Fraine | 24 Jan 13:17 2008
Picon

Re: Edit in MacVim


On 24-jan-08, at 12:46, Nico Weber wrote:
> These instructions worked for me (10.5.1), thanks :-)

Great, finally... :-)

> There's a small annoyance with MacVim though: If there are no windows
> open in MacVim (e.g. when it's not yet running) and you do "Edit in
> MacVim", MacVim is opened with two windows: An empty window and one
> for the "Edit in MacVim" contents. This does also happen when you use
> MacVim as editor in XCode. Bjorn, is it possible to check if MacVim
> was started via the ODB bridge, and not open a "default window" in
> this case?

I observe the same behavior and second that request.

Regards,
Bruno

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

travis | 24 Jan 13:20 2008
Picon

Re: Edit in MacVim InputManager [Re: Cyberduck and MacVim.app]


Hey everyone, I talked to Bruno and he gave me a step by step
installation and it worked!

"
    (- This is a Leopard machine, AFAIK he had no Vims or input
managers installed.)

    - Download the latest MacVim, we used snapshot 0712B. Install to
the /Applications directory. Open it.

    - Download and mount the disk image from http://slashpunt.org/vim/index.php?n=Main.Download

    - From the Terminal, do:
    defaults write org.slashpunt.edit_in_odbeditor
ODBEditorBundleIdentifier "org.vim.MacVim"
    defaults write org.slashpunt.edit_in_odbeditor ODBEditorName
MacVim
    sudo mkdir /Library/InputManagers
    sudo cp -pR "/Volumes/Vim/Edit in ODBEditor" /Library/
InputManagers
    sudo chown -R root:admin /Library/InputManagers

    - Start (or restart) the application where you want the Input
Manager, we used "TextEdit".

    - We could now see (and use) the "Edit in MacVim" item in the
"Edit" menu. The original document is opened in a new window (e.g.
"VIM1"). Every time you :w from MacVim, the data is sent back to the
original application. When you :q, the original application regains
(Continue reading)

Nigel Green | 24 Jan 13:23 2008

Re: Edit in MacVim


>> defaults write org.slashpunt.edit_in_odbeditor
>> ODBEditorBundleIdentifier "org.vim.MacVim"
>> defaults write org.slashpunt.edit_in_odbeditor ODBEditorName MacVim
>
> My "normal" user doesn't have admin rights. In this case, the two
> lines above have to be done as "normal" user.

This has worked for me as well. I ran it all as root before, but  
running those two lines as the 'normal' user worked like a treat.

Nigel

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

David Morel | 24 Jan 15:21 2008
Picon

Re: Edit in MacVim


Le 24 janv. 08 à 13:23, Nigel Green a écrit :

>
>
>>> defaults write org.slashpunt.edit_in_odbeditor
>>> ODBEditorBundleIdentifier "org.vim.MacVim"
>>> defaults write org.slashpunt.edit_in_odbeditor ODBEditorName MacVim
>>
>> My "normal" user doesn't have admin rights. In this case, the two
>> lines above have to be done as "normal" user.
>
> This has worked for me as well. I ran it all as root before, but
> running those two lines as the 'normal' user worked like a treat.

Same here, working as well. Although I had a hard time, and it  
involved (in random order):
- updating file associations and all that mysterious stuff with  
lsregister
- removing everything from /Library/InputManagers, then adding it again,
   etc.
- Setting the right permissions in said directory
- Multiple login/offs
- Fiddling with Info file in ODB directory (setting menu entry to YES)

Finally I don't know what made it work. All I know is everytime I
install an input manager, it's the same PITA :(

David Morel

(Continue reading)

björn | 24 Jan 18:50 2008
Picon

Re: Edit in MacVim


On 24/01/2008, Nico Weber <nicolasweber@...> wrote:
>
> There's a small annoyance with MacVim though: If there are no windows
> open in MacVim (e.g. when it's not yet running) and you do "Edit in
> MacVim", MacVim is opened with two windows: An empty window and one
> for the "Edit in MacVim" contents. This does also happen when you use
> MacVim as editor in XCode. Bjorn, is it possible to check if MacVim
> was started via the ODB bridge, and not open a "default window" in
> this case?

I wish!

As far as I can work out XCode does the following when you tell it to
open a document in MacVim:

1. Tell MacVim to open
2. Wait X seconds
3. Tell MacVim to open the specific document

So, at step 1 MacVim opens an untitled window if no window is already
open (this is what multi-document apps do by default); and then at
step 3 MacVim opens the document (in a new window, unless
MMOpenFilesInTabs is set).

You could argue that it would be better not to open an untitled window
in step 1, but this would have the side-effect that no untitled window
would appear when you first start MacVim either.  I guess this could
be worked around by having a variable which is set to FALSE the first
time an untitled window is opened and only open untitled windows when
(Continue reading)

björn | 24 Jan 19:27 2008
Picon

Re: Edit in MacVim


On 24/01/2008, björn <bjorn.winckler@...> wrote:
> On 24/01/2008, Nico Weber <nicolasweber@...> wrote:
> >
> > There's a small annoyance with MacVim though: If there are no windows
> > open in MacVim (e.g. when it's not yet running) and you do "Edit in
> > MacVim", MacVim is opened with two windows: An empty window and one
> > for the "Edit in MacVim" contents. This does also happen when you use
> > MacVim as editor in XCode. Bjorn, is it possible to check if MacVim
> > was started via the ODB bridge, and not open a "default window" in
> > this case?
>
> I wish!
>
> As far as I can work out XCode does the following when you tell it to
> open a document in MacVim:
>
> 1. Tell MacVim to open
> 2. Wait X seconds
> 3. Tell MacVim to open the specific document
>
> So, at step 1 MacVim opens an untitled window if no window is already
> open (this is what multi-document apps do by default); and then at
> step 3 MacVim opens the document (in a new window, unless
> MMOpenFilesInTabs is set).
>
> You could argue that it would be better not to open an untitled window
> in step 1, but this would have the side-effect that no untitled window
> would appear when you first start MacVim either.  I guess this could
> be worked around by having a variable which is set to FALSE the first
(Continue reading)

björn | 24 Jan 20:18 2008
Picon

Re: Edit in MacVim


On 24/01/2008, björn <bjorn.winckler@...> wrote:
> On 24/01/2008, björn <bjorn.winckler@...> wrote:
> > On 24/01/2008, Nico Weber <nicolasweber@...> wrote:
> > >
> > > There's a small annoyance with MacVim though: If there are no windows
> > > open in MacVim (e.g. when it's not yet running) and you do "Edit in
> > > MacVim", MacVim is opened with two windows: An empty window and one
> > > for the "Edit in MacVim" contents. This does also happen when you use
> > > MacVim as editor in XCode. Bjorn, is it possible to check if MacVim
> > > was started via the ODB bridge, and not open a "default window" in
> > > this case?
>
> The input manager does the same as Xcode; it first tells MacVim to
> open, then it tells MacVim to open the files.  I can only come up with
> one idea to work around this and that it is the following
>
> - if an untitled window is requested, start a timer to trigger one
> second (or so) later
> - if an "open files" event is received, stop the timer
> - if the time triggers, open an untitled window
>
> This should work in most cases (unless there is an unusually long
> delay before the "open files" event), but it has the negative
> side-effect that MacVim will seem to take longer to start up when you
> double-click on the MacVim.app icon, or if you click on the MacVim
> dock icon (but those are the only two cases where the delay would be
> noticed).  I don't think this is too much of a problem, since in most
> cases (I guess) MacVim is started with a file name argument (e.g. from
> Terminal or due to user double-clicking a file to edit it).
(Continue reading)

Nico Weber | 24 Jan 21:13 2008
Picon
Picon

Re: Edit in MacVim


> Ok, Bruno's instructions worked!  I will try to see if I can get rid
> of the extra window when using the Input Manager.  Also, I'll ask to
> see if I can put the input manager up for download on the MacVim page
> together with Bruno's instructions on how to install it.

Wouldn't it be much nicer to have a "Install MacVim input manager"  
menu item that does that automatically?

Nico

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


Gmane