Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 1 | " System gvimrc file for Mac OS X |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 2 | " Author: Benji Fisher <benji@member.AMS.org> |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 3 | " Last Change: Thu Mar 09 09:00 AM 2006 EST |
| 4 | " |
| 5 | " Define Mac-standard keyboard shortcuts. |
| 6 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 7 | " We don't change 'cpoptions' here, because it would not be set properly when |
| 8 | " a .vimrc file is found later. Thus don't use line continuation and use |
| 9 | " <special> in mappings. |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 10 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 11 | nnoremap <special> <D-n> :confirm enew<CR> |
| 12 | vmap <special> <D-n> <Esc><D-n>gv |
| 13 | imap <special> <D-n> <C-O><D-n> |
| 14 | cmap <special> <D-n> <C-C><D-n> |
| 15 | omap <special> <D-n> <Esc><D-n> |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 16 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 17 | nnoremap <special> <D-o> :browse confirm e<CR> |
| 18 | vmap <special> <D-o> <Esc><D-o>gv |
| 19 | imap <special> <D-o> <C-O><D-o> |
| 20 | cmap <special> <D-o> <C-C><D-o> |
| 21 | omap <special> <D-o> <Esc><D-o> |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 22 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 23 | nnoremap <silent> <special> <D-w> :if winheight(2) < 0 <Bar> confirm enew <Bar> else <Bar> confirm close <Bar> endif<CR> |
| 24 | vmap <special> <D-w> <Esc><D-w>gv |
| 25 | imap <special> <D-w> <C-O><D-w> |
| 26 | cmap <special> <D-w> <C-C><D-w> |
| 27 | omap <special> <D-w> <Esc><D-w> |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 28 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 29 | nnoremap <silent> <special> <D-s> :if expand("%") == ""<Bar>browse confirm w<Bar> else<Bar>confirm w<Bar>endif<CR> |
| 30 | vmap <special> <D-s> <Esc><D-s>gv |
| 31 | imap <special> <D-s> <C-O><D-s> |
| 32 | cmap <special> <D-s> <C-C><D-s> |
| 33 | omap <special> <D-s> <Esc><D-s> |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 34 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 35 | nnoremap <special> <D-S-s> :browse confirm saveas<CR> |
| 36 | vmap <special> <D-S-s> <Esc><D-s>gv |
| 37 | imap <special> <D-S-s> <C-O><D-s> |
| 38 | cmap <special> <D-S-s> <C-C><D-s> |
| 39 | omap <special> <D-S-s> <Esc><D-s> |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 40 | |
| 41 | " From the Edit menu of SimpleText: |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 42 | nnoremap <special> <D-z> u |
| 43 | vmap <special> <D-z> <Esc><D-z>gv |
| 44 | imap <special> <D-z> <C-O><D-z> |
| 45 | cmap <special> <D-z> <C-C><D-z> |
| 46 | omap <special> <D-z> <Esc><D-z> |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 47 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 48 | vnoremap <special> <D-x> "+x |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 49 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 50 | vnoremap <special> <D-c> "+y |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 51 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 52 | cnoremap <special> <D-c> <C-Y> |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 53 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 54 | nnoremap <special> <D-v> "+gP |
| 55 | cnoremap <special> <D-v> <C-R>+ |
| 56 | execute 'vnoremap <script> <special> <D-v>' paste#paste_cmd['v'] |
| 57 | execute 'inoremap <script> <special> <D-v>' paste#paste_cmd['i'] |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 58 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 59 | nnoremap <silent> <special> <D-a> :if &slm != ""<Bar>exe ":norm gggH<C-O>G"<Bar> else<Bar>exe ":norm ggVG"<Bar>endif<CR> |
| 60 | vmap <special> <D-a> <Esc><D-a> |
| 61 | imap <special> <D-a> <Esc><D-a> |
| 62 | cmap <special> <D-a> <C-C><D-a> |
| 63 | omap <special> <D-a> <Esc><D-a> |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 64 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 65 | nnoremap <special> <D-f> / |
| 66 | vmap <special> <D-f> <Esc><D-f> |
| 67 | imap <special> <D-f> <Esc><D-f> |
| 68 | cmap <special> <D-f> <C-C><D-f> |
| 69 | omap <special> <D-f> <Esc><D-f> |
Bram Moolenaar | 0fd9289 | 2006-03-09 22:27:48 +0000 | [diff] [blame] | 70 | |
Bram Moolenaar | 9c10238 | 2006-05-03 21:26:49 +0000 | [diff] [blame] | 71 | nnoremap <special> <D-g> n |
| 72 | vmap <special> <D-g> <Esc><D-g> |
| 73 | imap <special> <D-g> <C-O><D-g> |
| 74 | cmap <special> <D-g> <C-C><D-g> |
| 75 | omap <special> <D-g> <Esc><D-g> |