1 " System gvimrc file for MacVim
3 " Maintainer: Bjorn Winckler <bjorn.winckler@gmail.com>
4 " Last Change: Sun May 19 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 <Nop>
46 an 10.295 File.New\ Tab :tabnew<CR>
47 an <silent> 10.310 File.Open\.\.\. <Nop>
48 an <silent> 10.325 File.Open\ Recent <Nop>
49 an 10.328 File.-SEP0- <Nop>
50 an <silent> 10.330 File.Close\ Window<Tab>:qa :conf qa<CR>
51 an <silent> 10.332 File.Close :conf q<CR>
52 an <silent> 10.341 File.Save\ All :browse conf wa<CR>
53 an 10.350 File.Save\ As\.\.\.<Tab>:sav :browse confirm saveas<CR>
59 aunmenu Edit.Find\ and\ Replace
61 an 20.410.10 Edit.Find.Find\.\.\.<Tab>/ /
62 an 20.410.20 Edit.Find.Find\ Next <Nop>
63 an 20.410.30 Edit.Find.Find\ Previous <Nop>
64 vmenu 20.410.35 Edit.Find.Use\ Selection\ for\ Find y:let @/=@"<CR>n
65 an 20.410.40 Edit.Find.-SEP1- <Nop>
66 an 20.410.50 Edit.Find.Find\ and\ Replace\.\.\.<Tab>:%s :%s/
67 vunmenu Edit.Find.Find\ and\ Replace\.\.\.<Tab>:%s
68 vnoremenu Edit.Find.Find\ and\ Replace\.\.\.<Tab>:s :s/
70 an 20.460 Edit.-SEP4- <Nop>
71 an 20.465.10 Edit.Font.Show\ Fonts <Nop>
72 an 20.465.20 Edit.Font.-SEP5- <Nop>
73 an 20.465.30 Edit.Font.Bigger <Nop>
74 an 20.465.40 Edit.Font.Smaller <Nop>
75 an 20.470 Edit.Special\ Characters\.\.\. <Nop>
78 " Window menu (should be next to Help so give it a high priority)
81 an <silent> 9900.300 Window.Minimize <Nop>
82 an <silent> 9900.301 Window.Minimize\ All <Nop>
83 an <silent> 9900.310 Window.Zoom <Nop>
84 an <silent> 9900.311 Window.Zoom\ All <Nop>
85 an <silent> 9900.320 Window.Toggle\ Full\ Screen\ Mode :set invfullscreen<CR>
86 an 9900.330 Window.-SEP1- <Nop>
87 " TODO! Grey out if no tabs are visible.
88 an <silent> 9900.340 Window.Previous\ Tab :tabprevious<CR>
89 an <silent> 9900.350 Window.Next\ Tab :tabnext<CR>
90 an 9900.360 Window.-SEP2- <Nop>
91 an <silent> 9900.370 Window.Bring\ All\ To\ Front <Nop>
95 an 9999.1 Help.MacVim\ Help :h gui_mac<CR>
96 an <silent> 9999.2 Help.MacVim\ Website <Nop>
97 an 9999.3 Help.-sep0- <Nop>
103 " These items are special ('*' means zero or more arbitrary characters):
104 " -space*- an empty space
105 " -flexspace*- a flexible space
106 " -*- a separator item
108 " Remove some items so that all items are visible at the default window size.
109 "aunmenu ToolBar.Undo
110 "aunmenu ToolBar.Redo
111 "aunmenu ToolBar.-sep2-
113 "aunmenu ToolBar.Copy
114 "aunmenu ToolBar.Paste
115 "aunmenu ToolBar.-sep3-
116 aunmenu ToolBar.Replace
117 aunmenu ToolBar.FindNext
118 aunmenu ToolBar.FindPrev
119 aunmenu ToolBar.-sep5-
120 aunmenu ToolBar.-sep6-
121 aunmenu ToolBar.RunCtags
122 aunmenu ToolBar.TagJump
123 "aunmenu ToolBar.-sep7-
124 aunmenu ToolBar.FindHelp
126 "an 1.295 ToolBar.-flexspace7- <Nop>
130 " This is so that HIG Cmd and Option movement mappings can be disabled by
132 " let macvim_skip_cmd_opt_movement = 1
135 if !exists("macvim_skip_cmd_opt_movement")
139 no! <M-Left> <C-Left>
143 no <M-Right> <C-Right>
144 no! <M-Right> <C-Right>
155 endif " !exists("macvim_skip_cmd_opt_movement")
158 " This is so that the HIG shift movement related settings can be enabled by
160 " let macvim_hig_shift_movement = 1
161 " to the user .vimrc (not .gvimrc!).
163 if exists("macvim_hig_shift_movement")
164 " Shift + special movement key (<S-Left>, etc.) and mouse starts insert mode
165 set selectmode=mouse,key
166 set keymodel=startsel,stopsel
168 " HIG related shift + special movement key mappings
169 nn <S-D-Left> <S-Home>
170 vn <S-D-Left> <S-Home>
171 ino <S-D-Left> <S-Home>
172 nn <S-M-Left> <S-C-Left>
173 vn <S-M-Left> <S-C-Left>
174 ino <S-M-Left> <S-C-Left>
176 nn <S-D-Right> <S-End>
177 vn <S-D-Right> <S-End>
178 ino <S-D-Right> <S-End>
179 nn <S-M-Right> <S-C-Right>
180 vn <S-M-Right> <S-C-Right>
181 ino <S-M-Right> <S-C-Right>
183 nn <S-D-Up> <S-C-Home>
184 vn <S-D-Up> <S-C-Home>
185 ino <S-D-Up> <S-C-Home>
187 nn <S-D-Down> <S-C-End>
188 vn <S-D-Down> <S-C-End>
189 ino <S-D-Down> <S-C-End>
190 endif " exists("macvim_hig_shift_movement")
195 " Set up menu key equivalents (these should always have the 'D' modifier set),
196 " action bindings, and alternate items.
198 " Note: menu items which should execute an action are bound to <Nop>; the
199 " action message is specified here via the :macmenu command.
202 macm File.New\ Window key=<D-n> action=newWindow:
203 macm File.New\ Tab key=<D-t>
204 macm File.Open\.\.\. key=<D-o> action=fileOpen:
205 macm File.Open\ Tab\.\.\. key=<D-T>
206 macm File.Open\ Recent action=recentFilesDummy:
207 macm File.Close\ Window key=<D-W>
208 macm File.Close key=<D-w> action=performClose:
209 macm File.Save key=<D-s>
210 macm File.Save\ All key=<D-M-s> alt=YES
211 macm File.Save\ As\.\.\. key=<D-S>
212 macm File.Print key=<D-p>
214 macm Edit.Undo key=<D-z> action=undo:
215 macm Edit.Redo key=<D-Z> action=redo:
216 macm Edit.Cut key=<D-x> action=cut:
217 macm Edit.Copy key=<D-c> action=copy:
218 macm Edit.Paste key=<D-v> action=paste:
219 macm Edit.Select\ All key=<D-a> action=selectAll:
220 macm Edit.Find.Find\.\.\. key=<D-f>
221 macm Edit.Find.Find\ Next key=<D-g> action=findNext:
222 macm Edit.Find.Find\ Previous key=<D-G> action=findPrevious:
223 macm Edit.Find.Use\ Selection\ for\ Find key=<D-e>
224 macm Edit.Special\ Characters\.\.\. key=<D-M-t>
225 macm Edit.Font.Show\ Fonts action=orderFrontFontPanel:
226 macm Edit.Font.Bigger key=<D-=> action=fontSizeUp:
227 macm Edit.Font.Smaller key=<D--> action=fontSizeDown:
228 macm Edit.Special\ Characters\.\.\. action=orderFrontCharacterPalette:
230 macm Tools.Spelling.To\ Next\ error key=<D-;>
231 macm Tools.Spelling.Suggest\ Corrections key=<D-:>
232 macm Tools.Make key=<D-b>
233 macm Tools.List\ Errors key=<D-l>
234 macm Tools.List\ Messages key=<D-L>
235 macm Tools.Next\ Error key=<D-C-Right>
236 macm Tools.Previous\ Error key=<D-C-Left>
237 macm Tools.Older\ List key=<D-C-Up>
238 macm Tools.Newer\ List key=<D-C-Down>
240 macm Window.Minimize key=<D-m> action=performMiniaturize:
241 macm Window.Minimize\ All key=<D-M-m> action=miniaturizeAll: alt=YES
242 macm Window.Zoom key=<D-C-z> action=performZoom:
243 macm Window.Zoom\ All key=<D-M-C-z> action=zoomAll: alt=YES
244 macm Window.Toggle\ Full\ Screen\ Mode key=<D-F>
245 macm Window.Previous\ Tab key=<D-{>
246 macm Window.Next\ Tab key=<D-}>
247 macm Window.Bring\ All\ To\ Front action=arrangeInFront:
249 macm Help.MacVim\ Help key=<D-?>
250 macm Help.MacVim\ Website action=openWebsite:
252 " Restore the previous value of 'cpoptions'.
253 let &cpo = s:cpo_save