Improved method to start Vim processes in a login shell
[MacVim.git] / src / MacVim / gvimrc
blob745d257316c01150aefb62496307cdfc35cb8bd9
1 " System gvimrc file for MacVim
3 " Maintainer:   Bjorn Winckler <bjorn.winckler@gmail.com>
4 " Last Change:  Thu Mar 6 2008
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 <silent> 10.331 File.Close                   :maca performClose:<CR>
51 "an 10.331 File.Close\ Tab                   :tabclose<CR>
54 " Edit menu
56 aunmenu Edit.Find
57 aunmenu Edit.Find\ and\ Replace
59 an 20.410.10 Edit.Find.Find\.\.\.<Tab>/     /
60 an 20.410.20 Edit.Find.Find\ Next           :maca findNext:<CR>
61 an 20.410.30 Edit.Find.Find\ Previous       :maca findPrevious:<CR>
62 vmenu 20.410.35 Edit.Find.Use\ Selection\ for\ Find y:let @/=@"<CR>n
63 an 20.410.40 Edit.Find.-SEP1-               <Nop>
64 an 20.410.50 Edit.Find.Find\ and\ Replace\.\.\.<Tab>:%s   :%s/
65 vunmenu      Edit.Find.Find\ and\ Replace\.\.\.<Tab>:%s
66 vnoremenu    Edit.Find.Find\ and\ Replace\.\.\.<Tab>:s    :s/
68 an 20.460 Edit.-SEP4-                       <Nop>
69 an 20.465.10 Edit.Font.Show\ Fonts          :maca orderFrontFontPanel:<CR>
70 an 20.465.20 Edit.Font.-SEP5-               <Nop>
71 an 20.465.30 Edit.Font.Bigger               :maca fontSizeUp:<CR>
72 an 20.465.40 Edit.Font.Smaller              :maca fontSizeDown:<CR>
73 an 20.470 Edit.Special\ Characters\.\.\.    :maca orderFrontCharacterPalette:<CR>
76 " Window menu (should be next to Help so give it a high priority)
77 aunmenu Window
79 an <silent> 9900.300 Window.Minimize            :maca performMiniaturize:<CR>
80 an <silent> 9900.310 Window.Zoom                :maca performZoom:<CR>
81 an <silent> 9900.320 Window.Toggle\ Full\ Screen\ Mode  :set invfullscreen<CR>
82 an 9900.330 Window.-SEP1-                       <Nop>
83 " TODO! Grey out if no tabs are visible.
84 an <silent> 9900.340 Window.Previous\ Tab       :tabprevious<CR>
85 an <silent> 9900.350 Window.Next\ Tab           :tabnext<CR>
86 an 9900.360 Window.-SEP2-                       <Nop>
87 an <silent> 9900.370 Window.Bring\ All\ To\ Front :maca arrangeInFront:<CR>
92 " Toolbar
94 " These items are special ('*' means zero or more arbitrary characters):
95 "   -space*-        an empty space
96 "   -flexspace*-    a flexible space
97 "   -*-             a separator item
99 " Remove some items so that all items are visible at the default window size.
100 "aunmenu ToolBar.Undo
101 "aunmenu ToolBar.Redo
102 "aunmenu ToolBar.-sep2-
103 "aunmenu ToolBar.Cut
104 "aunmenu ToolBar.Copy
105 "aunmenu ToolBar.Paste
106 "aunmenu ToolBar.-sep3-
107 aunmenu ToolBar.Replace
108 aunmenu ToolBar.FindNext
109 aunmenu ToolBar.FindPrev
110 aunmenu ToolBar.-sep5-
111 aunmenu ToolBar.-sep6-
112 aunmenu ToolBar.RunCtags
113 aunmenu ToolBar.TagJump
114 "aunmenu ToolBar.-sep7-
115 aunmenu ToolBar.FindHelp
117 "an 1.295 ToolBar.-flexspace7-   <Nop>
121 " This is so that HIG Cmd and Option movement mappings can be disabled by
122 " adding the line
123 "   let macvim_skip_cmd_opt_movement = 1
124 " to the user .vimrc
126 if !exists("macvim_skip_cmd_opt_movement")
127   no   <D-Left>       <Home>
128   no!  <D-Left>       <Home>
129   no   <M-Left>       <C-Left>
130   no!  <M-Left>       <C-Left>
132   no   <D-Right>      <End>
133   no!  <D-Right>      <End>
134   no   <M-Right>      <C-Right>
135   no!  <M-Right>      <C-Right>
137   no   <D-Up>         <C-Home>
138   ino  <D-Up>         <C-Home>
139   map  <M-Up>         {
140   imap <M-Up>         <C-o>{
142   no   <D-Down>       <C-End>
143   ino  <D-Down>       <C-End>
144   map  <M-Down>       }
145   imap <M-Down>       <C-o>}
146 endif " !exists("macvim_skip_cmd_opt_movement")
149 " This is so that the HIG shift movement related settings can be enabled by
150 " adding the line
151 "   let macvim_hig_shift_movement = 1
152 " to the user .vimrc (not .gvimrc!).
154 if exists("macvim_hig_shift_movement")
155   " Shift + special movement key (<S-Left>, etc.) and mouse starts insert mode
156   set selectmode=mouse,key
157   set keymodel=startsel,stopsel
159   " HIG related shift + special movement key mappings
160   nn   <S-D-Left>     <S-Home>
161   vn   <S-D-Left>     <S-Home>
162   ino  <S-D-Left>     <S-Home>
163   nn   <S-M-Left>     <S-C-Left>
164   vn   <S-M-Left>     <S-C-Left>
165   ino  <S-M-Left>     <S-C-Left>
167   nn   <S-D-Right>    <S-End>
168   vn   <S-D-Right>    <S-End>
169   ino  <S-D-Right>    <S-End>
170   nn   <S-M-Right>    <S-C-Right>
171   vn   <S-M-Right>    <S-C-Right>
172   ino  <S-M-Right>    <S-C-Right>
174   nn   <S-D-Up>       <S-C-Home>
175   vn   <S-D-Up>       <S-C-Home>
176   ino  <S-D-Up>       <S-C-Home>
178   nn   <S-D-Down>     <S-C-End>
179   vn   <S-D-Down>     <S-C-End>
180   ino  <S-D-Down>     <S-C-End>
181 endif " exists("macvim_hig_shift_movement")
186 " Menu key equivalents (these should always have the 'D' modifier set)
189 macmenukey File.New\ Window                       <D-n>
190 macmenukey File.New\ Tab                          <D-t>
192 macmenukey File.Open\.\.\.                        <D-o>
193 macmenukey File.Open\ Tab\.\.\.                   <D-T>
194 macmenukey File.Close\ Window                     <D-W>
195 "macmenukey File.Close\ Tab                        <D-w>
196 macmenukey File.Close                             <D-w>
197 macmenukey File.Save                              <D-s>
198 macmenukey File.Save\ As\.\.\.                    <D-S>
199 macmenukey File.Print                             <D-p>
201 macmenukey Edit.Undo                              <D-z>
202 macmenukey Edit.Redo                              <D-Z>
203 macmenukey Edit.Cut                               <D-x>
204 macmenukey Edit.Copy                              <D-c>
205 macmenukey Edit.Paste                             <D-v>
206 macmenukey Edit.Select\ All                       <D-a>
207 macmenukey Edit.Find.Find\.\.\.                   <D-f>
208 macmenukey Edit.Find.Find\ Next                   <D-g>
209 macmenukey Edit.Find.Find\ Previous               <D-G>
210 macmenukey Edit.Find.Use\ Selection\ for\ Find    <D-e>
211 macmenukey Edit.Special\ Characters\.\.\.         <D-M-t> 
212 macmenukey Edit.Font.Bigger                       <D-=>
213 macmenukey Edit.Font.Smaller                      <D-->
215 macmenukey Tools.Spelling.To\ Next\ error         <D-;>
216 macmenukey Tools.Spelling.Suggest\ Corrections    <D-:>
217 macmenukey Tools.Make                             <D-b>
218 macmenukey Tools.List\ Errors                     <D-l>
219 macmenukey Tools.List\ Messages                   <D-L>
220 macmenukey Tools.Next\ Error                      <D-C-Right>
221 macmenukey Tools.Previous\ Error                  <D-C-Left>
222 macmenukey Tools.Older\ List                      <D-C-Up>
223 macmenukey Tools.Newer\ List                      <D-C-Down>
225 macmenukey Window.Minimize                        <D-m>
226 macmenukey Window.Zoom                            <D-C-z>
227 macmenukey Window.Toggle\ Full\ Screen\ Mode      <D-F>
228 macmenukey Window.Previous\ Tab                   <D-{>
229 macmenukey Window.Next\ Tab                       <D-}>
232 " Restore the previous value of 'cpoptions'.
233 let &cpo = s:cpo_save
234 unlet s:cpo_save