*os_mac.txt* For Vim version 7.2b. 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 , , 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: