1 " System gvimrc file for MacVim
3 " Maintainer: Bjorn Winckler <bjorn.winckler@gmail.com>
4 " Last Change: Sun Oct 04 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>
63 " The following function is aken from menu.vim
65 " Fix text in nameless register to be used with :promptfind.
66 return substitute(@", "[\r\n]", '\\n', 'g')
70 aunmenu Edit.Find\ and\ Replace
72 an <silent> 20.410.10 Edit.Find.Find\.\.\. :promptfind<CR>
73 vunmenu Edit.Find.Find\.\.\.
74 vnoremenu <silent> Edit.Find.Find\.\.\. y:promptfind <C-R>=<SID>FixFText()<CR><CR>
75 an 20.410.20 Edit.Find.Find\ Next <Nop>
76 an 20.410.30 Edit.Find.Find\ Previous <Nop>
77 vmenu 20.410.35 Edit.Find.Use\ Selection\ for\ Find y:let @/=@"<CR>:<BS>
79 an 20.460 Edit.-SEP4- <Nop>
80 an 20.465.10 Edit.Font.Show\ Fonts <Nop>
81 an 20.465.20 Edit.Font.-SEP5- <Nop>
82 an 20.465.30 Edit.Font.Bigger <Nop>
83 an 20.465.40 Edit.Font.Smaller <Nop>
84 an 20.470 Edit.Special\ Characters\.\.\. <Nop>
87 " Window menu (should be next to Help so give it a high priority)
90 an <silent> 9900.300 Window.Minimize <Nop>
91 an <silent> 9900.301 Window.Minimize\ All <Nop>
92 an <silent> 9900.310 Window.Zoom <Nop>
93 an <silent> 9900.311 Window.Zoom\ All <Nop>
94 an <silent> 9900.320 Window.Toggle\ Full\ Screen\ Mode :set invfullscreen<CR>
95 an 9900.330 Window.-SEP1- <Nop>
96 " TODO! Grey out if no tabs are visible.
97 an <silent> 9900.340 Window.Previous\ Tab :tabprevious<CR>
98 an <silent> 9900.350 Window.Next\ Tab :tabnext<CR>
99 an 9900.360 Window.-SEP2- <Nop>
100 an <silent> 9900.370 Window.Bring\ All\ To\ Front <Nop>
104 an 9999.1 Help.MacVim\ Help :h gui_mac<CR>
105 an <silent> 9999.2 Help.MacVim\ Website <Nop>
106 an 9999.3 Help.-sep0- <Nop>
112 " These items are special ('*' means zero or more arbitrary characters):
113 " -space*- an empty space
114 " -flexspace*- a flexible space
115 " -*- a separator item
117 " Remove some items so that all items are visible at the default window size.
118 "aunmenu ToolBar.Undo
119 "aunmenu ToolBar.Redo
120 "aunmenu ToolBar.-sep2-
122 "aunmenu ToolBar.Copy
123 "aunmenu ToolBar.Paste
124 "aunmenu ToolBar.-sep3-
125 aunmenu ToolBar.Replace
126 aunmenu ToolBar.FindNext
127 aunmenu ToolBar.FindPrev
128 aunmenu ToolBar.-sep5-
129 aunmenu ToolBar.-sep6-
130 aunmenu ToolBar.RunCtags
131 aunmenu ToolBar.TagJump
132 "aunmenu ToolBar.-sep7-
133 aunmenu ToolBar.FindHelp
135 "an 1.295 ToolBar.-flexspace7- <Nop>
139 " This is so that HIG Cmd and Option movement mappings can be disabled by
141 " let macvim_skip_cmd_opt_movement = 1
144 if !exists("macvim_skip_cmd_opt_movement")
148 no! <M-Left> <C-Left>
152 no <M-Right> <C-Right>
153 no! <M-Right> <C-Right>
167 endif " !exists("macvim_skip_cmd_opt_movement")
170 " This is so that the HIG shift movement related settings can be enabled by
172 " let macvim_hig_shift_movement = 1
173 " to the user .vimrc (not .gvimrc!).
175 if exists("macvim_hig_shift_movement")
176 " Shift + special movement key (<S-Left>, etc.) and mouse starts insert mode
177 set selectmode=mouse,key
178 set keymodel=startsel,stopsel
180 " HIG related shift + special movement key mappings
181 nn <S-D-Left> <S-Home>
182 vn <S-D-Left> <S-Home>
183 ino <S-D-Left> <S-Home>
184 nn <S-M-Left> <S-C-Left>
185 vn <S-M-Left> <S-C-Left>
186 ino <S-M-Left> <S-C-Left>
188 nn <S-D-Right> <S-End>
189 vn <S-D-Right> <S-End>
190 ino <S-D-Right> <S-End>
191 nn <S-M-Right> <S-C-Right>
192 vn <S-M-Right> <S-C-Right>
193 ino <S-M-Right> <S-C-Right>
195 nn <S-D-Up> <S-C-Home>
196 vn <S-D-Up> <S-C-Home>
197 ino <S-D-Up> <S-C-Home>
199 nn <S-D-Down> <S-C-End>
200 vn <S-D-Down> <S-C-End>
201 ino <S-D-Down> <S-C-End>
202 endif " exists("macvim_hig_shift_movement")
207 " Set up menu key equivalents (these should always have the 'D' modifier set),
208 " action bindings, and alternate items.
210 " Note: menu items which should execute an action are bound to <Nop>; the
211 " action message is specified here via the :macmenu command.
214 macm File.New\ Window key=<D-n> action=newWindow:
215 macm File.New\ Tab key=<D-t>
216 macm File.Open\.\.\. key=<D-o> action=fileOpen:
217 macm File.Open\ Tab\.\.\. key=<D-T>
218 macm File.Open\ Recent action=recentFilesDummy:
219 macm File.Close\ Window key=<D-W>
220 macm File.Close key=<D-w> action=performClose:
221 macm File.Save key=<D-s>
222 macm File.Save\ All key=<D-M-s> alt=YES
223 macm File.Save\ As\.\.\. key=<D-S>
224 macm File.Print key=<D-p>
226 macm Edit.Undo key=<D-z> action=undo:
227 macm Edit.Redo key=<D-Z> action=redo:
228 macm Edit.Cut key=<D-x> action=cut:
229 macm Edit.Copy key=<D-c> action=copy:
230 macm Edit.Paste key=<D-v> action=paste:
231 macm Edit.Select\ All key=<D-a> action=selectAll:
232 macm Edit.Find.Find\.\.\. key=<D-f>
233 macm Edit.Find.Find\ Next key=<D-g> action=findNext:
234 macm Edit.Find.Find\ Previous key=<D-G> action=findPrevious:
235 macm Edit.Find.Use\ Selection\ for\ Find key=<D-e>
236 macm Edit.Special\ Characters\.\.\. key=<D-M-t>
237 macm Edit.Font.Show\ Fonts action=orderFrontFontPanel:
238 macm Edit.Font.Bigger key=<D-=> action=fontSizeUp:
239 macm Edit.Font.Smaller key=<D--> action=fontSizeDown:
240 macm Edit.Special\ Characters\.\.\. action=orderFrontCharacterPalette:
242 macm Tools.Spelling.To\ Next\ error key=<D-;>
243 macm Tools.Spelling.Suggest\ Corrections key=<D-:>
244 macm Tools.Make key=<D-b>
245 macm Tools.List\ Errors key=<D-l>
246 macm Tools.List\ Messages key=<D-L>
247 macm Tools.Next\ Error key=<D-C-Right>
248 macm Tools.Previous\ Error key=<D-C-Left>
249 macm Tools.Older\ List key=<D-C-Up>
250 macm Tools.Newer\ List key=<D-C-Down>
252 macm Window.Minimize key=<D-m> action=performMiniaturize:
253 macm Window.Minimize\ All key=<D-M-m> action=miniaturizeAll: alt=YES
254 macm Window.Zoom key=<D-C-z> action=performZoom:
255 macm Window.Zoom\ All key=<D-M-C-z> action=zoomAll: alt=YES
256 macm Window.Toggle\ Full\ Screen\ Mode key=<D-F>
257 macm Window.Previous\ Tab key=<D-{>
258 macm Window.Next\ Tab key=<D-}>
259 macm Window.Bring\ All\ To\ Front action=arrangeInFront:
261 macm Help.MacVim\ Help key=<D-?>
262 macm Help.MacVim\ Website action=openWebsite:
264 " Restore the previous value of 'cpoptions'.
265 let &cpo = s:cpo_save