1 " System gvimrc file for MacVim
3 " Maintainer: Bjorn Winckler <bjorn.winckler@gmail.com>
4 " Last Change: Fri Mar 21 2008
6 " This is a work in progress. If you feel so inclined, please help me improve
10 " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise
11 " <CR> would not be recognized. See ":help 'cpoptions'".
17 " Global default options
20 if !exists("syntax_on")
24 if !exists("colors_name")
25 " Use the macvim color scheme by default
39 aunmenu File.Open\.\.\.
43 aunmenu File.Save-Exit
45 an <silent> 10.290 File.New\ Window :maca newWindow:<CR>
46 an 10.295 File.New\ Tab :tabnew<CR>
47 an <silent> 10.310 File.&Open\.\.\. :maca fileOpen:<CR>
48 an <silent> 10.314 File.Open\ Recent :maca recentFilesDummy:<CR>
49 an 10.328 File.-SEP0- <Nop>
50 an <silent> 10.330 File.Close\ Window<Tab>:qa :confirm qa<CR>
51 an <silent> 10.331 File.Close :maca performClose:<CR>
52 "an 10.331 File.Close\ Tab :tabclose<CR>
58 aunmenu Edit.Find\ and\ Replace
60 an 20.410.10 Edit.Find.Find\.\.\.<Tab>/ /
61 an 20.410.20 Edit.Find.Find\ Next :maca findNext:<CR>
62 an 20.410.30 Edit.Find.Find\ Previous :maca findPrevious:<CR>
63 vmenu 20.410.35 Edit.Find.Use\ Selection\ for\ Find y:let @/=@"<CR>n
64 an 20.410.40 Edit.Find.-SEP1- <Nop>
65 an 20.410.50 Edit.Find.Find\ and\ Replace\.\.\.<Tab>:%s :%s/
66 vunmenu Edit.Find.Find\ and\ Replace\.\.\.<Tab>:%s
67 vnoremenu Edit.Find.Find\ and\ Replace\.\.\.<Tab>:s :s/
69 an 20.460 Edit.-SEP4- <Nop>
70 an 20.465.10 Edit.Font.Show\ Fonts :maca orderFrontFontPanel:<CR>
71 an 20.465.20 Edit.Font.-SEP5- <Nop>
72 an 20.465.30 Edit.Font.Bigger :maca fontSizeUp:<CR>
73 an 20.465.40 Edit.Font.Smaller :maca fontSizeDown:<CR>
74 an 20.470 Edit.Special\ Characters\.\.\. :maca orderFrontCharacterPalette:<CR>
77 " Window menu (should be next to Help so give it a high priority)
80 an <silent> 9900.300 Window.Minimize :maca performMiniaturize:<CR>
81 an <silent> 9900.310 Window.Zoom :maca performZoom:<CR>
82 an <silent> 9900.320 Window.Toggle\ Full\ Screen\ Mode :set invfullscreen<CR>
83 an 9900.330 Window.-SEP1- <Nop>
84 " TODO! Grey out if no tabs are visible.
85 an <silent> 9900.340 Window.Previous\ Tab :tabprevious<CR>
86 an <silent> 9900.350 Window.Next\ Tab :tabnext<CR>
87 an 9900.360 Window.-SEP2- <Nop>
88 an <silent> 9900.370 Window.Bring\ All\ To\ Front :maca arrangeInFront:<CR>
92 an 9999.1 Help.MacVim\ Help :h gui_mac<CR>
93 an <silent> 9999.2 Help.MacVim\ Website :maca openWebsite:<CR>
94 an 9999.3 Help.-sep0- <Nop>
100 " These items are special ('*' means zero or more arbitrary characters):
101 " -space*- an empty space
102 " -flexspace*- a flexible space
103 " -*- a separator item
105 " Remove some items so that all items are visible at the default window size.
106 "aunmenu ToolBar.Undo
107 "aunmenu ToolBar.Redo
108 "aunmenu ToolBar.-sep2-
110 "aunmenu ToolBar.Copy
111 "aunmenu ToolBar.Paste
112 "aunmenu ToolBar.-sep3-
113 aunmenu ToolBar.Replace
114 aunmenu ToolBar.FindNext
115 aunmenu ToolBar.FindPrev
116 aunmenu ToolBar.-sep5-
117 aunmenu ToolBar.-sep6-
118 aunmenu ToolBar.RunCtags
119 aunmenu ToolBar.TagJump
120 "aunmenu ToolBar.-sep7-
121 aunmenu ToolBar.FindHelp
123 "an 1.295 ToolBar.-flexspace7- <Nop>
127 " This is so that HIG Cmd and Option movement mappings can be disabled by
129 " let macvim_skip_cmd_opt_movement = 1
132 if !exists("macvim_skip_cmd_opt_movement")
136 no! <M-Left> <C-Left>
140 no <M-Right> <C-Right>
141 no! <M-Right> <C-Right>
152 endif " !exists("macvim_skip_cmd_opt_movement")
155 " This is so that the HIG shift movement related settings can be enabled by
157 " let macvim_hig_shift_movement = 1
158 " to the user .vimrc (not .gvimrc!).
160 if exists("macvim_hig_shift_movement")
161 " Shift + special movement key (<S-Left>, etc.) and mouse starts insert mode
162 set selectmode=mouse,key
163 set keymodel=startsel,stopsel
165 " HIG related shift + special movement key mappings
166 nn <S-D-Left> <S-Home>
167 vn <S-D-Left> <S-Home>
168 ino <S-D-Left> <S-Home>
169 nn <S-M-Left> <S-C-Left>
170 vn <S-M-Left> <S-C-Left>
171 ino <S-M-Left> <S-C-Left>
173 nn <S-D-Right> <S-End>
174 vn <S-D-Right> <S-End>
175 ino <S-D-Right> <S-End>
176 nn <S-M-Right> <S-C-Right>
177 vn <S-M-Right> <S-C-Right>
178 ino <S-M-Right> <S-C-Right>
180 nn <S-D-Up> <S-C-Home>
181 vn <S-D-Up> <S-C-Home>
182 ino <S-D-Up> <S-C-Home>
184 nn <S-D-Down> <S-C-End>
185 vn <S-D-Down> <S-C-End>
186 ino <S-D-Down> <S-C-End>
187 endif " exists("macvim_hig_shift_movement")
192 " Menu key equivalents (these should always have the 'D' modifier set)
195 macmenukey File.New\ Window <D-n>
196 macmenukey File.New\ Tab <D-t>
198 macmenukey File.Open\.\.\. <D-o>
199 macmenukey File.Open\ Tab\.\.\. <D-T>
200 macmenukey File.Close\ Window <D-W>
201 "macmenukey File.Close\ Tab <D-w>
202 macmenukey File.Close <D-w>
203 macmenukey File.Save <D-s>
204 macmenukey File.Save\ As\.\.\. <D-S>
205 macmenukey File.Print <D-p>
207 macmenukey Edit.Undo <D-z>
208 macmenukey Edit.Redo <D-Z>
209 macmenukey Edit.Cut <D-x>
210 macmenukey Edit.Copy <D-c>
211 macmenukey Edit.Paste <D-v>
212 macmenukey Edit.Select\ All <D-a>
213 macmenukey Edit.Find.Find\.\.\. <D-f>
214 macmenukey Edit.Find.Find\ Next <D-g>
215 macmenukey Edit.Find.Find\ Previous <D-G>
216 macmenukey Edit.Find.Use\ Selection\ for\ Find <D-e>
217 macmenukey Edit.Special\ Characters\.\.\. <D-M-t>
218 macmenukey Edit.Font.Bigger <D-=>
219 macmenukey Edit.Font.Smaller <D-->
221 macmenukey Tools.Spelling.To\ Next\ error <D-;>
222 macmenukey Tools.Spelling.Suggest\ Corrections <D-:>
223 macmenukey Tools.Make <D-b>
224 macmenukey Tools.List\ Errors <D-l>
225 macmenukey Tools.List\ Messages <D-L>
226 macmenukey Tools.Next\ Error <D-C-Right>
227 macmenukey Tools.Previous\ Error <D-C-Left>
228 macmenukey Tools.Older\ List <D-C-Up>
229 macmenukey Tools.Newer\ List <D-C-Down>
231 macmenukey Window.Minimize <D-m>
232 macmenukey Window.Zoom <D-C-z>
233 macmenukey Window.Toggle\ Full\ Screen\ Mode <D-F>
234 macmenukey Window.Previous\ Tab <D-{>
235 macmenukey Window.Next\ Tab <D-}>
237 " TODO: <D-?> seems to be reserved by the system on Leopard. Disable this key
238 " equivalent until I can figure out what to do about it.
239 "macmenukey Help.MacVim\ Help <D-?>
242 " Restore the previous value of 'cpoptions'.
243 let &cpo = s:cpo_save