summaryrefslogtreecommitdiff
path: root/runtime/doc/os_mac.txt
blob: f6492fe484c189dbb1ab3e9a7c5485d3c265b4b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
*os_mac.txt*    For Vim version 7.4b.  Last change: 2006 Apr 30


		  VIM REFERENCE MANUAL    by Bram Moolenaar et al.


					*mac* *Mac* *macintosh* *Macintosh*

This file documents the particularities of the Macintosh version of Vim.

NOTE: This file is a bit outdated.  You might find more useful info here:
	http://macvim.org/

1. Filename Convention		|mac-filename|
2. .vimrc an .vim files		|mac-vimfile|
3. FAQ				|mac-faq|
4. Known Lack			|mac-lack|
5. Mac Bug Report		|mac-bug|
6. Compiling Vim		|mac-compile|

There was a Mac port for version 3.0 of Vim.  Here are the first few lines
from the old file:

VIM Release Notes
Initial Macintosh release, VIM version 3.0
19 October 1994

Eric Fischer
<enf1@midway.uchicago.edu>, <eric@jcp.uchicago.edu>, <etaoin@uchicago.edu>
5759 N. Guilford Ave
Indianapolis IN 46220 USA

==============================================================================
1. Filename Convention					*mac-filename*

Starting with Vim version 7 you can just use the unix path separators with
Vim. In order to determine if the specified filename is relative to the
current folder or absolute (i.e. relative to the "Desktop"), the following
algorithm is used:

	If the path start by a "/", the path is absolute
	If the path start by a ":", the path is relative
	If the path doesn't start by neither a "/" nor ":",
	  and a ":" is found before a "/" then the path is absolute
>
		:e /HD/text
		:e HD:text
<	Edit the file "text" of the disk "HD" >
		:e :src:main.c
		:e src/main.c
<	Edit the file "main.c" in the folder "src" in the current folder >
		:e os_mac.c
<	Edit the file "os_mac.c" in the current folder.

You can use the |$VIM| and |$VIMRUNTIME|  variable. >

		:so $VIMRUNTIME:syntax:syntax.vim

==============================================================================
2. .vimrc and .vim files				*mac-vimfile*

It is recommended to use Unix style line separators for Vim scripts, thus a
single newline character.

When starting up Vim will load the $VIMRUNTIME/macmap.vim script to define
default command-key mappings.

On older systems files starting with a dot "." are discouraged, thus the rc
files are named "vimrc" or "_vimrc" and "gvimrc" or "_gvimrc".  These files
can be in any format (mac, dos or unix).  Vim can handle any file format when
the |'nocompatible'| option is set, otherwise it will only handle mac format
files.

==============================================================================
3. Mac FAQ						*mac-faq*

On the internet:  http://macvim.org/OSX/index.php#FAQ

Q: I can't enter non-ASCII character in Apple Terminal.
A: Under Window Settings, Emulation, make sure that "Escape non-ASCII
   characters" is not checked.

Q: How do I start the GUI from the command line?
A: Assuming that Vim.app is located in /Applications:
	open /Applications/Vim.app
   Or:
	/Applications/Vim.app/Contents/MacOS/Vim -g  {arguments}

Q: How can I set $PATH to something reasonable when I start Vim.app from the
   GUI or with open?
A: The following trick works with most shells.  Put it in your vimrc file.
   This is included in the system vimrc file included with the binaries
   distributed at macvim.org . >
	let s:path = system("echo echo VIMPATH'${PATH}' | $SHELL -l")
	let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')

==============================================================================
4. Mac Lack						*mac-lack*

In a terminal CTRL-^ needs to be entered as Shift-Control-6.  CTRL-@ as
Shift-Control-2.

==============================================================================
5. Mac Bug Report					*mac-bug*

When reporting any Mac specific bug or feature change, please use the vim-mac
maillist |vim-mac|.  However, you need to be subscribed.  An alternative is to
send a message to the current MacVim maintainers:

	mac@vim.org

==============================================================================
6. Compiling Vim					*mac-compile*

See the file "src/INSTALLmac.txt" that comes with the source files.


 vim:tw=78:ts=8:ft=help:norl: