Add support for :winpos
[MacVim.git] / runtime / doc / os_mac.txt
blobd8585f2f42cbc1d88d638fc25b5c0f5bf3f7232c
1 *os_mac.txt*    For Vim version 7.2.  Last change: 2006 Apr 30
4                   VIM REFERENCE MANUAL    by Bram Moolenaar et al.
7                                         *mac* *Mac* *macintosh* *Macintosh*
9 This file documents the particularities of the Mac version of Vim.  It was
10 written with the older Carbon version of Vim in mind.  If you are using the
11 newer MacVim.app then please go to |macvim|.  Some of the information here
12 does not apply to MacVim.app.
14 NOTE: This file is a bit outdated.  You might find more useful info on the old
15 Carbon version of Vim here:
16         http://macvim.org/
18 1. Filename Convention          |mac-filename|
19 2. .vimrc an .vim files         |mac-vimfile|
20 3. FAQ                          |mac-faq|
21 4. Known Lack                   |mac-lack|
22 5. Mac Bug Report               |mac-bug|
23 6. Compiling Vim                |mac-compile|
25 There was a Mac port for version 3.0 of Vim.  Here are the first few lines
26 from the old file:
28 VIM Release Notes
29 Initial Macintosh release, VIM version 3.0
30 19 October 1994
32 Eric Fischer
33 <enf1@midway.uchicago.edu>, <eric@jcp.uchicago.edu>, <etaoin@uchicago.edu>
34 5759 N. Guilford Ave
35 Indianapolis IN 46220 USA
37 ==============================================================================
38 1. Filename Convention                                  *mac-filename*
40 Starting with Vim version 7 you can just use the unix path separators with
41 Vim. In order to determine if the specified filename is relative to the
42 current folder or absolute (i.e. relative to the "Desktop"), the following
43 algorithm is used:
45         If the path start by a "/", the path is absolute
46         If the path start by a ":", the path is relative
47         If the path doesn't start by neither a "/" nor ":",
48           and a ":" is found before a "/" then the path is absolute
50                 :e /HD/text
51                 :e HD:text
52 <       Edit the file "text" of the disk "HD" >
53                 :e :src:main.c
54                 :e src/main.c
55 <       Edit the file "main.c" in the folder "src" in the current folder >
56                 :e os_mac.c
57 <       Edit the file "os_mac.c" in the current folder.
59 You can use the |$VIM| and |$VIMRUNTIME|  variable. >
61                 :so $VIMRUNTIME:syntax:syntax.vim
63 ==============================================================================
64 2. .vimrc and .vim files                                *mac-vimfile*
66 It is recommended to use Unix style line separators for Vim scripts, thus a
67 single newline character.
69 When starting up Vim will load the $VIMRUNTIME/macmap.vim script to define
70 default command-key mappings.
72 On older systems files starting with a dot "." are discouraged, thus the rc
73 files are named "vimrc" or "_vimrc" and "gvimrc" or "_gvimrc".  These files
74 can be in any format (mac, dos or unix).  Vim can handle any file format when
75 the |'nocompatible'| option is set, otherwise it will only handle mac format
76 files.
78 ==============================================================================
79 3. Mac FAQ                                              *mac-faq*
81 On the internet:  http://macvim.org/OSX/index.php#FAQ
83 Q: I can't enter non-ASCII character in Apple Terminal.
84 A: Under Window Settings, Emulation, make sure that "Escape non-ASCII
85    characters" is not checked.
87 Q: How do I start the GUI from the command line?
88 A: Assuming that Vim.app is located in /Applications:
89         open /Applications/Vim.app
90    Or:
91         /Applications/Vim.app/Contents/MacOS/Vim -g  {arguments}
93 Q: How can I set $PATH to something reasonable when I start Vim.app from the
94    GUI or with open?
95 A: The following trick works with most shells.  Put it in your vimrc file.
96    This is included in the system vimrc file included with the binaries
97    distributed at macvim.org . >
98         let s:path = system("echo echo VIMPATH'${PATH}' | $SHELL -l")
99         let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')
101 ==============================================================================
102 4. Mac Lack                                             *mac-lack*
104 In a terminal CTRL-^ needs to be entered as Shift-Control-6.  CTRL-@ as
105 Shift-Control-2.
107 ==============================================================================
108 5. Mac Bug Report                                       *mac-bug*
110 When reporting any Mac specific bug or feature change, please use the vim-mac
111 maillist |vim-mac|.  However, you need to be subscribed.  An alternative is to
112 send a message to the current MacVim maintainers:
114         mac@vim.org
116 ==============================================================================
117 6. Compiling Vim                                        *mac-compile*
119 See the file "src/INSTALLmac.txt" that comes with the source files.
122  vim:tw=78:ts=8:ft=help:norl: