|
|
Subject: Re: Edit in MacVim - msg#00124
List: editors.vim.mac
On 24/01/2008, Nigel Green
<greenlemur101-gM/Ye1E23mwN+BqQ9rBEUg@xxxxxxxxxxxxxxxx> wrote:
>
> On 24 Jan 2008, at 17:50, björn wrote:
>
> > 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 for one would prefer that the app didn't open with a blank window at
> all. I generally only open the app as a response to another action -
> opening a file in Finder, requesting a file to open with MacVim in
> Terminal, etc - so wouldn't miss the blank window. Is it possible to
> set this as a preference so you could have the app open with a blank
> window or not (TextMate does this with a preference to open an
> untitled document on open, on open or re-activation, or never). I
> always have this set to 'never' if I have an option.
That is a nice feature...I will implement it. Thanks for the suggestion!
/Björn
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: Edit in MacVim
On 24/01/2008, Nico Weber <nicolasweber-Mmb7MZpHnFY@xxxxxxxxxxxxxxxx> wrote:
>
> > - 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 sound annoying. Startup time is long enough as is already ;-) Is
> it possible to check why MacVim was activated and open the untitled
> window only if this happened via a click on the dock item or by
> launching MacVim?
I don't know any way of doing this unfortunately.
Anyway, it doesn't matter. I've changed the opening procedure so that
if a "file open" event is received, then MacVim always tries to open
the files in an untitled window (if there is one open or launching).
This takes care of both the Xcode and input manager problems (i.e.
there is no longer a problem with two windows opening).
The only negative side-effect at the moment is that sometimes the
"welcome screen" in Vim is momentarily displayed and then the files
open, resulting in an annoying "flash". I'm not sure what to do about
this at the moment, let me know if this is very annoying.
Another potential nuisance is that the way I detect an "untitled
window' is very dumb at the moment (I just check if the window title
starts with "[No Name]"). I should come up with a better check
(probably by using Vim script), but I am so slow at writing scripts
that I decided to go with the easiest solution for now. Any help with
a script that checks if a Vim process is "unused" would be very
welcome.
This is a bit of a change to the file opening procedure, so please
pull the latest version and let me know if I've introduced some new
bugs.
/Björn
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Next Message by Date:
click to view message preview
Cursor in Macvim
Hi all.
I'm having a really odd situation with Macvim, and I'm hoping someone
can help me, or at least give me a reason for it.
I am a blind Mac user and I'm using Voiceover, the speech interface
for the Mac to do basically everything. the problem I seem to be
having with Macvim is, well, the cursor Macvim is using does not seem
to be the usual text cursor that cocoa apps use.
Let me try to explain. If I'm using textedit, for example, and I enter
some text, when I move around with the arrow keys, I can hear the
characters spoken. Cursor movement gets spoken and all is right with
my world.
In macvim, cursor movements are *not* spoken. According to the
feedback I'm getting, the cursor is constantly at the bottom of the
screen and nothing is spoken, but examineing the vim results, the
cursor *is* moving, Just, apparently, not the one Voiceover knows
about.
Does this make any sense? If it does, are there any solutions to this?
BTW, if anyone wants to test this, Voiceover is activated by pressing
cmd-f5 and deactivated the same way.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Previous Message by Thread:
click to view message preview
Re: Edit in MacVim
On 24 Jan 2008, at 17:50, björn wrote:
> 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 for one would prefer that the app didn't open with a blank window at
all. I generally only open the app as a response to another action -
opening a file in Finder, requesting a file to open with MacVim in
Terminal, etc - so wouldn't miss the blank window. Is it possible to
set this as a preference so you could have the app open with a blank
window or not (TextMate does this with a preference to open an
untitled document on open, on open or re-activation, or never). I
always have this set to 'never' if I have an option.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Next Message by Thread:
click to view message preview
Re: Edit in MacVim
I know this is a long thread with lots of solutions already mentioned,
but I think things are getting a bit complicated here.
I have the equivalent of "Edit in MacVim" implemented in two different
and easier to implement ways.
*) First, by using mvim.app:
http://phaseportrait.blogspot.com/2007/12/file-associations-and-path-with-macvim.html
*) Second, by using OnMyCommand (do a search for OnMyCommand, a popular
OS X application for customizing the context menu).
Additionally, both of these methods set the PATH correctly, so you'll
have no trouble shelling out to your compiler (e.g., latex) of choice.
--Ted
Bruno De Fraine wrote:
> Hello,
>
> On 23-jan-08, at 22:34, Travis Jeffery wrote:
>> 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:
>
> (- 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 focus.
>
> - Afterwards, I also tried the "Edit in MacVim" item when MacVim is
> not yet opened. This works as well.
>
> Best luck, Bruno
>
> >
>
--
Ted Pavlic <ted-h4YI4kzIBEV8UrSeD/g0lQ@xxxxxxxxxxxxxxxx>
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
|
|