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