File->Open pops up a modal 'open files' dialog
[MacVim.git] / src / MacVim / gvimrc
blobdcbe5db984f8ecc081c9313dbe531d7b64ded17e
1 " System gvimrc file for MacVim
3 " Maintainer:   Bjorn Winckler <bjorn.winckler@gmail.com>
4 " Last Change:  Mon Oct 27 2007
6 " This is a work in progress.  If you feel so inclined, please help me improve
7 " this file.
10 " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise
11 " <CR> would not be recognized.  See ":help 'cpoptions'".
12 let s:cpo_save = &cpo
13 set cpo&vim
17 " Global default options
20 if !exists("syntax_on")
21   syntax on
22 endif
24 if !exists("colors_name")
25     " Use the macvim color scheme by default
26     colorscheme macvim
27 endif
32 " Extra menus
36 " File menu
38 aunmenu File.New
39 aunmenu File.Open\.\.\.
40 aunmenu File.Close
41 aunmenu File.-SEP4-
42 aunmenu File.Exit
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 10.328 File.-SEP0-                           <Nop>
49 an <silent> 10.330 File.Close\ Window<Tab>:qa   :confirm qa<CR>
50 an 10.331 File.Close<Tab>:q                     :confirm q<CR>
51 "an 10.331 File.Close\ Tab                   :tabclose<CR>
53 an 20.460 Edit.-SEP4-                       <Nop>
54 an 20.465.10 Edit.Font.Show\ Fonts          :maca orderFrontFontPanel:<CR>
55 an 20.465.20 Edit.Font.-SEP5-               <Nop>
56 an 20.465.30 Edit.Font.Bigger               :maca fontSizeUp:<CR>
57 an 20.465.40 Edit.Font.Smaller              :maca fontSizeDown:<CR>
58 an 20.470 Edit.Special\ Characters\.\.\.    :maca orderFrontCharacterPalette:<CR>
61 " Window menu (should be next to Help so give it a high priority)
62 aunmenu Window
64 an <silent> 9900.300 Window.Minimize            :maca performMiniaturize:<CR>
65 an <silent> 9900.310 Window.Zoom                :maca performZoom:<CR>
66 an <silent> 9900.320 Window.Toggle\ Full\ Screen\ Mode  :set invfullscreen<CR>
67 an 9900.330 Window.-SEP1-                       <Nop>
68 " TODO! Grey out if no tabs are visible.
69 an <silent> 9900.340 Window.Previous\ Tab       :tabprevious<CR>
70 an <silent> 9900.350 Window.Next\ Tab           :tabnext<CR>
71 an 9900.360 Window.-SEP2-                       <Nop>
72 an <silent> 9900.370 Window.Bring\ All\ To\ Front :maca arrangeInFront:<CR>
77 " Toolbar
79 " These items are special ('*' means zero or more arbitrary characters):
80 "   -space*-        an empty space
81 "   -flexspace*-    a flexible space
82 "   -*-             a separator item
84 " Remove some items so that all items are visible at the default window size.
85 "aunmenu ToolBar.Undo
86 "aunmenu ToolBar.Redo
87 "aunmenu ToolBar.-sep2-
88 "aunmenu ToolBar.Cut
89 "aunmenu ToolBar.Copy
90 "aunmenu ToolBar.Paste
91 "aunmenu ToolBar.-sep3-
92 aunmenu ToolBar.Replace
93 aunmenu ToolBar.FindNext
94 aunmenu ToolBar.FindPrev
95 aunmenu ToolBar.-sep5-
96 aunmenu ToolBar.-sep6-
97 aunmenu ToolBar.RunCtags
98 aunmenu ToolBar.TagJump
99 "aunmenu ToolBar.-sep7-
100 aunmenu ToolBar.FindHelp
102 "an 1.295 ToolBar.-flexspace7-   <Nop>
106 " This is so that HIG Cmd and Option movement mappings can be disabled by
107 " adding the line
108 "   let macvim_skip_cmd_opt_movement = 1
109 " to the user .vimrc
111 if !exists("macvim_skip_cmd_opt_movement")
112   no   <D-Left>       <Home>
113   no!  <D-Left>       <Home>
114   no   <M-Left>       <C-Left>
115   no!  <M-Left>       <C-Left>
117   no   <D-Right>      <End>
118   no!  <D-Right>      <End>
119   no   <M-Right>      <C-Right>
120   no!  <M-Right>      <C-Right>
122   no   <D-Up>         <C-Home>
123   ino  <D-Up>         <C-Home>
124   map  <M-Up>         {
125   imap <M-Up>         <C-o>{
127   no   <D-Down>       <C-End>
128   ino  <D-Down>       <C-End>
129   map  <M-Down>       }
130   imap <M-Down>       <C-o>}
131 endif " !exists("macvim_skip_cmd_opt_movement")
134 " This is so that the HIG shift movement related settings can be enabled by
135 " adding the line
136 "   let macvim_hig_shift_movement = 1
137 " to the user .vimrc (not .gvimrc!).
139 if exists("macvim_hig_shift_movement")
140   " Shift + special movement key (<S-Left>, etc.) and mouse starts insert mode
141   set selectmode=mouse,key
142   set keymodel=startsel,stopsel
144   " HIG related shift + special movement key mappings
145   nn   <S-D-Left>     <S-Home>
146   vn   <S-D-Left>     <S-Home>
147   ino  <S-D-Left>     <S-Home>
148   nn   <S-M-Left>     <S-C-Left>
149   vn   <S-M-Left>     <S-C-Left>
150   ino  <S-M-Left>     <S-C-Left>
152   nn   <S-D-Right>    <S-End>
153   vn   <S-D-Right>    <S-End>
154   ino  <S-D-Right>    <S-End>
155   nn   <S-M-Right>    <S-C-Right>
156   vn   <S-M-Right>    <S-C-Right>
157   ino  <S-M-Right>    <S-C-Right>
159   nn   <S-D-Up>       <S-C-Home>
160   vn   <S-D-Up>       <S-C-Home>
161   ino  <S-D-Up>       <S-C-Home>
163   nn   <S-D-Down>     <S-C-End>
164   vn   <S-D-Down>     <S-C-End>
165   ino  <S-D-Down>     <S-C-End>
166 endif " exists("macvim_hig_shift_movement")
171 " Menu key equivalents (these should always have the 'D' modifier set)
174 macmenukey File.New\ Window                       <D-n>
175 macmenukey File.New\ Tab                          <D-t>
177 macmenukey File.Open\.\.\.                        <D-o>
178 macmenukey File.Open\ Tab\.\.\.                   <D-T>
179 macmenukey File.Close\ Window                     <D-W>
180 "macmenukey File.Close\ Tab                        <D-w>
181 macmenukey File.Close                             <D-w>
182 macmenukey File.Save                              <D-s>
183 macmenukey File.Save\ As\.\.\.                    <D-S>
184 macmenukey File.Print                             <D-p>
186 macmenukey Edit.Undo                              <D-z>
187 macmenukey Edit.Redo                              <D-Z>
188 macmenukey Edit.Cut                               <D-x>
189 macmenukey Edit.Copy                              <D-c>
190 macmenukey Edit.Paste                             <D-v>
191 macmenukey Edit.Select\ All                       <D-a>
192 macmenukey Edit.Special\ Characters\.\.\.         <D-M-t> 
193 macmenukey Edit.Font.Bigger                       <D-=>
194 macmenukey Edit.Font.Smaller                      <D-->
196 macmenukey Tools.Spelling.To\ Next\ error         <D-;>
197 macmenukey Tools.Spelling.Suggest\ Corrections    <D-:>
198 macmenukey Tools.Make                             <D-b>
199 macmenukey Tools.List\ Errors                     <D-l>
200 macmenukey Tools.List\ Messages                   <D-L>
201 macmenukey Tools.Next\ Error                      <D-C-Right>
202 macmenukey Tools.Previous\ Error                  <D-C-Left>
203 macmenukey Tools.Older\ List                      <D-C-Up>
204 macmenukey Tools.Newer\ List                      <D-C-Down>
206 macmenukey Window.Minimize                        <D-m>
207 macmenukey Window.Toggle\ Full\ Screen\ Mode      <D-F>
208 macmenukey Window.Previous\ Tab                   <D-{>
209 macmenukey Window.Next\ Tab                       <D-}>
212 " Restore the previous value of 'cpoptions'.
213 let &cpo = s:cpo_save
214 unlet s:cpo_save