Bram Moolenaar | 3991dab | 2006-03-27 17:01:56 +0000 | [diff] [blame] | 1 | *os_mac.txt* For Vim version 7.0c. Last change: 2006 Mar 26 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 2 | |
| 3 | |
| 4 | VIM REFERENCE MANUAL by Bram Moolenaar et al. |
| 5 | |
| 6 | |
| 7 | *mac* *Mac* *macintosh* *Macintosh* |
| 8 | |
| 9 | This file documents the particularities of the Macintosh version of Vim. |
| 10 | |
| 11 | NOTE: This file is a bit outdated. You might find more useful info here: |
Bram Moolenaar | 89cb5e0 | 2004-07-19 20:55:54 +0000 | [diff] [blame] | 12 | http://macvim.org/ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 13 | |
| 14 | 1. Filename Convention |mac-filename| |
| 15 | 2. .vimrc an .vim files |mac-vimfile| |
| 16 | 3. FAQ |mac-faq| |
| 17 | 4. Known Lack |mac-lack| |
| 18 | 5. Mac Bug Report |mac-bug| |
| 19 | 6. Compiling Vim |mac-compile| |
| 20 | |
| 21 | There was a Mac port for version 3.0 of Vim. Here are the first few lines |
| 22 | from the old file: |
| 23 | |
| 24 | VIM Release Notes |
| 25 | Initial Macintosh release, VIM version 3.0 |
| 26 | 19 October 1994 |
| 27 | |
| 28 | Eric Fischer |
| 29 | <enf1@midway.uchicago.edu>, <eric@jcp.uchicago.edu>, <etaoin@uchicago.edu> |
| 30 | 5759 N. Guilford Ave |
| 31 | Indianapolis IN 46220 USA |
| 32 | |
| 33 | ============================================================================== |
| 34 | 1. Filename Convention *mac-filename* |
| 35 | |
Bram Moolenaar | 4ea8fe1 | 2006-03-09 22:32:39 +0000 | [diff] [blame] | 36 | Starting with Vim version 7 you can just use the unix path separators with |
| 37 | Vim. In order to determine if the specified filename is relative to the |
| 38 | current folder or absolute (i.e. relative to the "Desktop"), the following |
| 39 | algorithm is used: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 40 | |
| 41 | If the path start by a "/", the path is absolute |
| 42 | If the path start by a ":", the path is relative |
| 43 | If the path doesn't start by neither a "/" nor ":", |
| 44 | and a ":" is found before a "/" then the path is absolute |
| 45 | > |
| 46 | :e /HD/text |
| 47 | :e HD:text |
| 48 | < Edit the file "text" of the disk "HD" > |
| 49 | :e :src:main.c |
| 50 | :e src/main.c |
| 51 | < Edit the file "main.c" in the folder "src" in the current folder > |
| 52 | :e os_mac.c |
| 53 | < Edit the file "os_mac.c" in the current folder. |
| 54 | |
| 55 | You can use the |$VIM| and |$VIMRUNTIME| variable. > |
| 56 | |
| 57 | :so $VIMRUNTIME:syntax:syntax.vim |
| 58 | |
| 59 | ============================================================================== |
| 60 | 2. .vimrc and .vim files *mac-vimfile* |
| 61 | |
Bram Moolenaar | 4ea8fe1 | 2006-03-09 22:32:39 +0000 | [diff] [blame] | 62 | It is recommended to use Unix style line separators for Vim scripts, thus a |
| 63 | single newline character. |
| 64 | |
| 65 | When starting up Vim will load the $VIMRUNTIME/macmap.vim script to define |
| 66 | default command-key mappings. |
| 67 | |
| 68 | On older systems files starting with a dot "." are discouraged, thus the rc |
| 69 | files are named "vimrc" or "_vimrc" and "gvimrc" or "_gvimrc". These files |
| 70 | can be in any format (mac, dos or unix). Vim can handle any file format when |
| 71 | the |'nocompatible'| option is set, otherwise it will only handle mac format |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 72 | files. |
| 73 | |
| 74 | ============================================================================== |
| 75 | 3. Mac FAQ *mac-faq* |
| 76 | |
Bram Moolenaar | 3991dab | 2006-03-27 17:01:56 +0000 | [diff] [blame] | 77 | On the internet: http://macvim.org/OSX/index.php#FAQ |
| 78 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 79 | Q: I can't enter non-ASCII character in Apple Terminal. |
| 80 | A: Under Window Settings, Emulation, make sure that "Escape non-ASCII |
| 81 | characters" is not checked. |
| 82 | |
Bram Moolenaar | 1cd871b | 2004-12-19 22:46:22 +0000 | [diff] [blame] | 83 | Q: How do I start the GUI from the command line? |
| 84 | A: Assuming that Vim.app is located in /Applications: |
| 85 | open /Applications/Vim.app |
| 86 | Or: |
| 87 | /Applications/Vim.app/Contents/MacOS/Vim -g {arguments} |
| 88 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 89 | ============================================================================== |
| 90 | 4. Mac Lack *mac-lack* |
| 91 | |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 92 | In a terminal CTRL-^ needs to be entered as Shift-Control-6. CTRL-@ as |
| 93 | Shift-Control-2. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 94 | |
| 95 | ============================================================================== |
| 96 | 5. Mac Bug Report *mac-bug* |
| 97 | |
| 98 | When reporting any Mac specific bug or feature change, please use the vim-mac |
| 99 | maillist |vim-mac|. However, you need to be subscribed. An alternative is to |
| 100 | send a message to the current MacVim maintainers: |
| 101 | |
| 102 | mac@vim.org |
| 103 | |
| 104 | ============================================================================== |
| 105 | 6. Compiling Vim *mac-compile* |
| 106 | |
| 107 | See the file "src/INSTALLmac.txt" that comes with the source files. |
| 108 | |
| 109 | |
| 110 | vim:tw=78:ts=8:ft=help:norl: |