Bram Moolenaar | 1 Aug 2007 17:00
Picon

new Vim book


Kim Schulz has written a book on using Vim  The full title is:
"Hacking Vim: A Cookbook to get the Most out of the Latest Vim Editor".

I have written a bit of info about it on this page:
	http://iccf-holland.org/click5.html

--

-- 
hundred-and-one symptoms of being an internet addict:
81. At social functions you introduce your husband as "my domain server."

 /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

björn | 1 Aug 2007 19:32
Picon
Gravatar

Re: New snapshot (r38) of MacVim

>     :q on the last buffer closes the window and not the app? Is that
>     intentional?
>
>
> This is expected (Apple) behaviour for apps with multiple windows (e.g.
> see what happens when you close the last window in Safari).
>
> The thing that is confusing is that the application you are running is
> MacVim (the GUI) and not Vim, which is just a process associated with
> one of MacVim's windows.  When you type :q, you are telling Vim to quit,
> but to MacVim this only means "close the window".  To me this is not so
> much of an issue, since I am used to hitting <D-q> to close apps on a
> Mac anyway, but if you are coming from another OS this might seem weird.
>

Yes, it seems wierd since the carbon gvim closes with :q the last
window. Isn't that the "expected" vim behavior though? Is the object to
Macify Vim on OSX?

I must be misunderstanding your question, because to me it seems like I already answered it in my last post.  In any case, let me try to answer it again.

Carbon Vim is one application running one Vim process.  MacVim is one application running multiple Vim processes.  I.e. Carbon Vim is an application with only one window and MacVim is an application with multiple windows.  It is standard (Apple) behaviour that apps with only one window should quit when the window closes, whereas apps with multiple windows should only quit when the user selects "Quit" on the application's menu.  Thus, MacVim should _not_ quit when you type ":q" even if you only had one Vim process ( i.e. one window) open at that time.

Of course, if many people object to this kind of behaviour in MacVim then I could change it.  But I would need a good reason to do so.  Saying that "Carbon Vim" behaves in this way is not enough of an argument to me.  I do appreciate the input though! :)


/Björn

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

Nico Weber | 2 Aug 2007 00:20
Picon
Picon

Re: new Vim book


Hi all,

> Kim Schulz has written a book on using Vim  The full title is:
> "Hacking Vim: A Cookbook to get the Most out of the Latest Vim  
> Editor".

I bought a copy a few weeks ago and I can recommend it. It doesn't  
cover the basics in much detail, but describes many somewhat advanced  
features, many of which I didn't know before.

Nico

ps: I don't know Kim Schulz and have no advantages if you buy the  
book. It's just that I liked it :-)

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

Robert Hicks | 2 Aug 2007 03:34
Picon
Gravatar

Re: New snapshot (r38) of MacVim


björn wrote:
<snip>
> Of course, if many people object to this kind of behaviour in MacVim 
> then I could change it.  But I would need a good reason to do so.  
> Saying that "Carbon Vim" behaves in this way is not enough of an 
> argument to me.  I do appreciate the input though! :)
> 
> 
I understand. It isn't just a "Carbon Vim" thing though or maybe I am 
crazy. When I have "vim" open :q closes vim when there are no other 
buffers open. On Windows and HP/UX when I use GVim and I :q when there 
are no other buffers open GVim exits entirely. It is only the MacVim one 
that behaves differently. I am not saying that is good or bad. I just 
wanted to make sure that it was the intended behavior since it is a 
"snapshot" and you would have liked feedback on it.  : )

Thanks for the answer and for the build. I do like it.

Robert

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

björn | 2 Aug 2007 07:26
Picon
Gravatar

Re: New snapshot (r38) of MacVim

> Of course, if many people object to this kind of behaviour in MacVim
> then I could change it.  But I would need a good reason to do so.
> Saying that "Carbon Vim" behaves in this way is not enough of an
> argument to me.  I do appreciate the input though! :)
>
>
I understand. It isn't just a "Carbon Vim" thing though or maybe I am
crazy. When I have "vim" open :q closes vim when there are no other
buffers open. On Windows and HP/UX when I use GVim and I :q when there
are no other buffers open GVim exits entirely. It is only the MacVim one
that behaves differently. I am not saying that is good or bad. I just
wanted to make sure that it was the intended behavior since it is a
"snapshot" and you would have liked feedback on it.  : )

Thanks for the answer and for the build. I do like it.

This is kind of funny...just after having written that long rant I sat down and did some work on MacVim only to realise the menus behave very oddly if there are no Vim windows open.  The best short-term solution was to...here it comes...make MacVim quit automatically when the last window closes.  :)

So lets see if anybody has any objections as to why MacVim _shouldn't_ quit when the last window closes.  Like Robert says, the good side to this solution is that this is more familiar to Vim users from other platforms;  the bad side is that it is not standard Apple behaviour.  Which one do people think is the lesser evil here?


/Björn

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

Jeremy Conlin | 2 Aug 2007 15:36
Picon

Re: New snapshot (r38) of MacVim

On 8/2/07, björn <bjorn.winckler <at> gmail.com> wrote:
This is kind of funny...just after having written that long rant I sat down and did some work on MacVim only to realise the menus behave very oddly if there are no Vim windows open.  The best short-term solution was to...here it comes...make MacVim quit automatically when the last window closes.  :)

So lets see if anybody has any objections as to why MacVim _shouldn't_ quit when the last window closes.  Like Robert says, the good side to this solution is that this is more familiar to Vim users from other platforms;  the bad side is that it is not standard Apple behaviour.  Which one do people think is the lesser evil here?
 


IMHO, I think an app should close when its last window is close.  I realize this isn't very Mac like, but this is a soft rule.  There are many apps that quit when their last window is closed.  In short, I think its an old tradition that is dying.

Jeremy

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

Robert Hicks | 2 Aug 2007 16:39
Picon
Gravatar

Re: New snapshot (r38) of MacVim


björn wrote:
>      > Of course, if many people object to this kind of behaviour in MacVim
>      > then I could change it.  But I would need a good reason to do so.
>      > Saying that "Carbon Vim" behaves in this way is not enough of an
>      > argument to me.  I do appreciate the input though! :)
>      >
>      >
>     I understand. It isn't just a "Carbon Vim" thing though or maybe I am
>     crazy. When I have "vim" open :q closes vim when there are no other
>     buffers open. On Windows and HP/UX when I use GVim and I :q when there
>     are no other buffers open GVim exits entirely. It is only the MacVim
>     one
>     that behaves differently. I am not saying that is good or bad. I just
>     wanted to make sure that it was the intended behavior since it is a
>     "snapshot" and you would have liked feedback on it.  : )
> 
>     Thanks for the answer and for the build. I do like it.
> 
> 
> This is kind of funny...just after having written that long rant I sat 
> down and did some work on MacVim only to realise the menus behave very 
> oddly if there are no Vim windows open.  The best short-term solution 
> was to...here it comes...make MacVim quit automatically when the last 
> window closes.  :)
> 
> So lets see if anybody has any objections as to why MacVim _shouldn't_ 
> quit when the last window closes.  Like Robert says, the good side to 
> this solution is that this is more familiar to Vim users from other 
> platforms;  the bad side is that it is not standard Apple behaviour.  
> Which one do people think is the lesser evil here?
> 
> 

You probably know my answer.  : )

I think it should work like Vim does on other platforms. That is the 
great thing about it. While there are some nuances, by and large I get 
the same behavior on Linux, Windows and OSX. That is the plus for me.

Robert

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

Nico Weber | 2 Aug 2007 18:48
Picon
Picon

Re: New snapshot (r38) of MacVim

Hi,

On 8/2/07, björn <bjorn.winckler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
This is kind of funny...just after having written that long rant I sat down and did some work on MacVim only to realise the menus behave very oddly if there are no Vim windows open. The best short-term solution was to...here it comes...make MacVim quit automatically when the last window closes. :)

So lets see if anybody has any objections as to why MacVim _shouldn't_ quit when the last window closes. Like Robert says, the good side to this solution is that this is more familiar to Vim users from other platforms; the bad side is that it is not standard Apple behaviour. Which one do people think is the lesser evil here?

It should do what the HIG says; ie stay open. Disable the menus if there's no window. That way, I can hit Cmd-N to open a new vim window, and opening files is slightly faster because the app is already loaded (atm, this is not really true because each window spawns its own process, but in the long run it might be).

Nico



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

Matt O'Brien | 2 Aug 2007 22:09
Picon

Re: New snapshot (r38) of MacVim


On 8/2/07, Nico Weber <nicolasweber@...> wrote:
>
> It should do what the HIG says; ie stay open. Disable the menus if there's
> no window. That way, I can hit Cmd-N to open a new vim window, and opening
> files is slightly faster because the app is already loaded (atm, this is not
> really true because each window spawns its own process, but in the long run
> it might be).
>
> Nico

another vote for following the HIG. i was under the impression that
this project was to make a more Mac-like vim. there could always be a
preference to quit the app when closing the last window.

matt

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

Nico Weber | 3 Aug 2007 07:29
Picon
Picon

MacVim toolbar issues


Hi,

the toolbar problems are caused by the line

         [toolbar setShowsBaselineSeparator:NO];

If this is uncommented, all is well. A short-term fix is to uncomment  
that line and to add

     [tabBarControl setStyleNamed: <at> "Unified"];

to windowDidLoad so that it doesn't look completely hideous. The demo  
app included with PSMTabBarController doesn't seem to have that  
problem. I'll take another look tomorrow.

Nico

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


Gmane