macmap.vim 2.4 KB

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