Hi,

First, I appreciate your effort on this issue.  Although this email is lengthy, 
I’d be happy if you would done with it.

On Oct 14, 2015, at 2:03, Devin Weaver <[email protected]> wrote:

> This is long over due. I realize that the Mac versions of things have
> moved to MacVim and most people install via Homebrew without giving
> second thought to the actual Vim source. However, I tend to jump to
> README_mac.txt when I clone the Vim source. Every time I do a small
> little kitten in Suburbia Ville cries uncontrollably. I can't be the
> only one who pines for some Mac love in the main Vim source.
> 
> Well here is a first draft of such documentation. Along with homage to
> the great options like MacVim and Homebrew. And some (inadequate) advise
> on how to go about things on their own.
> 
> Hope this helps round out a very tiny yet neglected part.
> ---
> README_mac.txt | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 48 insertions(+), 1 deletion(-)
> 
> diff --git a/README_mac.txt b/README_mac.txt
> index 08888d9..8c2520c 100644
> --- a/README_mac.txt
> +++ b/README_mac.txt
> @@ -4,5 +4,52 @@ This file explains the installation of Vim on Macintosh 
> systems.
> See "README.txt" for general information about Vim.
> -Sorry, this text still needs to be written!
> +VIM ON MAC OS X
> +
> +On Mac OS X there are two flavors of Vim. Compiling from this source will
> +create a terminal based version of Vim like any other Unix like environment.

In addition to them, you can also have GUI versions of vim on X11 if you 
install an X11 for Mac, e.g., XQuartz (http://xquartz.macosforge.org/landing/), 
which was once official part of Mac OS X.

After installing that, start it and check the box [Full-screen mode] at 
[X11]->[Preferences…]->[Output].  Use `command+option+A` to switch from X11 to 
the native Mac GUI and vice versa.  Quit by click [X11]->[Quit X11] for now.

Then, create the file `~/.xinitrc.d/myxinit.sh` (You can replace `myxinit` with 
anything you like, but the filename must end with `.sh`) and put the line 
`export USERWM=twm` (if you use `bash`) or alike there.

Start X11 again.  Then you’ll have an X11 there as if you went back to early 
90’s, but with true color, anti-aliasing fonts and other graphics and device 
extensions since then.

A right click on the root window should give you a menu which can be used to 
open xterm.  Immediately after selecting xterm, you’ll only see a frame one of 
the corners of which the pointer is placed at.  Don’t panic :-)  Move the 
pointer without pressing any button to drag the frame in such a way the whole 
frame appears on the screen. Give it a click, then you’ll see an xterm before 
you.

Now build vim with GUI enabled configure (perhaps, `configure` automatically 
detects the X11 and choose a proper GUI toolkit —- X11 Intrinsics/Athena in 
this case.  If that’s not the case for you, add the following options to 
`configure`
```
    —x-includes=/opt/X11/include —x-libraries=/opt/X11/lib —enable-gui=athena
```

and run it again.

Then do the usual sequence of `make` and `make install` to complete build and 
install.

Now, you have a vim/gvim of early or middle 90’s. (You might need to do `export 
PATH=/usr/local/bin:$PATH` on the command line prior to running your vim (more 
precisely, `vim -g`), in case another vim, which has already been installed 
natively with Mac OS X, is invoked instead of your shiny (rather, silver old?) 
newly installed vim.

Although I know little about Homebrew, if you use MacPorts, I’m sure you can 
install the latest gtk+2, gtk+3 and gnome (though I didn’t try the last). 
Recompiling vim with the option `—enable-gui=gtk`, you’ll get the same vim that 
can be seen on linux boxes.  Welcome back to the 21 century!

You can have even a Motif version vim on the latest Mac OS X if you will ;-)

> +There is a separate project called MacVim which uses the same source base but
> +compiles a Mac OS X native application that is installed in your
> +"/Applications" folder.
> +
> +If you wish to have a native GUI for the Mac please take a look at the MacVim
> +project at https://github.com/macvim-dev/macvim
> +
> +Both variants can be easily compiled and installed through Homebrew
> +(http://brew.sh/).

Even without Homebrew or any other package managers, you’ll also have your own 
vim by getting the tarball and unarchiving it, changing the working directory 
to the source tree top, then doing  `./configure; make; make install`.  That’s 
all.

So, there’s nothing particular to Mac OS X in comparison with other UNIX 
variants.  In this sense, one might say there’s no need for a README dedicated 
to Mac OS X, because it’s a UNIX anyway.

That said, difficulties (or, enjoyments?) arise once you know there’re a lot of 
ways to play with vim on Mac OS X.  They ranges from vim build and install per 
se to some sort of system admin works.

In this sense, it would be quite helpful if we had a sort of comprehensive 
document on all about vim build and install for Mac OS X.

> +
> +
> +HOW TO BUILD AND INSTALL
> +
> +If you wish to compile Vim (the terminal version not MacVim) yourself then
> +follow these instructions.
> +
> +Run "./configure" in the "src/" directory with the flags you want (call
> +"./configure --help" to see a list of flags) e.g.:
> +
> +    $ cd src
> +    $ ./configure --with-features=huge \
> +                  --with-tlib=ncurses \
> +                  --enable-multibyte \
> +                  --enable-rubyinterp \
> +                  --enable-pythoninterp \
> +                  --enable-perlinterp \
> +                  —enable-cscope

I’d rather like to have short but informative explanations on the options 
proper to Mac OS X such as
```
* —disable-darwin
* —with-mac-arch=ARCH
* —with-developer-dir=DIR (in conjunction with `xcode-select`).
```
(If I miss something, please add that to the list.)

The options you chose don’t look so much about Mac OS X…

> +
> +Now build the project using "make":
> +
> +    $ make

After that, executing `make test` would be a good habit for all users building 
and installing vim for themselves to have confidence in their work.

Best regards,
Kazunobu Kuriyama

> +
> +
> +CAVEAT
> +
> +Avoid using "STRIP=true" during the build step. If stripping the binaries is
> +enabled, vim will segfault with statically-linked interpreters like ruby
> +http://code.google.com/p/vim/issues/detail?id=114&thanks=114&ts=1361483471
> +
> +Finally you can install Vim to the system with:
> +
> +    $ make install
> +
> +The install step CAN use the "STRIP=true" if you wish.
> -- 
> 2.4.5
> 
> 
> -- 
> PGP Key: DE767C8A / FA9F 1400 8BA5 A847 B097 7C06 EBD9 9C92 DE76 7C8A
> http://tritarget.org/key
> 
> -- 
> -- 
> You received this message from the "vim_dev" 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_dev" 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.

-- 
-- 
You received this message from the "vim_dev" 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_dev" 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.

Raspunde prin e-mail lui