First version of macvim help file
[MacVim/jjgod.git] / gvimrc
blob22dc7f9f379c13cd1eb30452a6b5315cd61e14db
1 " System gvimrc file for MacVim
3 " Maintainer:   Björn Winckler <bjorn.winckler@gmail.com>
4 " Last Change:  Sun Sep 9 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 " Change selection color on focus change
25 au FocusLost * hi Visual guibg=MacSecondarySelectedControlColor
26 au FocusGained * hi Visual guibg=MacSelectedTextBackgroundColor
30 " Extra menus
34 " File menu
36 aunmenu File.New
37 aunmenu File.Close
38 aunmenu File.-SEP4-
39 aunmenu File.Exit
40 aunmenu File.Save-Exit
42 an <silent> 10.290 File.New\ Window             :action newVimWindow:<CR>
43 an  10.295 File.New\ Tab                        :tabnew<CR>
44 an 10.328 File.-SEP0-                           <Nop>
45 an <silent> 10.330 File.Close\ Window<Tab>:qa   :confirm qa<CR>
46 an 10.331 File.Close<Tab>:q                     :confirm q<CR>
47 "an 10.331 File.Close\ Tab                   :tabclose<CR>
49 an 20.460 Edit.-SEP4-                       <Nop>
50 an 20.465 Edit.Show\ Fonts\.\.\.            :action orderFrontFontPanel:<CR>
51 an 20.470 Edit.Special\ Characters\.\.\.    :action orderFrontCharacterPalette:<CR>
54 " Window menu
55 aunmenu Window
57 an <silent> 70.300 Window.Minimize          :action performMiniaturize:<CR>
58 an <silent> 70.310 Window.Zoom              :action performZoom:<CR>
59 an 70.320 Window.-SEP1-                     <Nop>
60 " TODO! Grey out if no tabs are visible.
61 an <silent> 70.330 Window.Previous\ Tab     :tabprevious<CR>
62 an <silent> 70.340 Window.Next\ Tab         :tabnext<CR>
63 an 70.350 Window.-SEP2-                     <Nop>
64 an <silent> 70.360 Window.Bring\ All\ To\ Front :action arrangeInFront:<CR>
69 " Toolbar
71 " These items are special ('*' means zero or more arbitrary characters):
72 "   -space*-        an empty space
73 "   -flexspace*-    a flexible space
74 "   -*-             a separator item
76 " Remove some items so that all items are visible at the default window size.
77 "aunmenu ToolBar.Undo
78 "aunmenu ToolBar.Redo
79 "aunmenu ToolBar.-sep2-
80 "aunmenu ToolBar.Cut
81 "aunmenu ToolBar.Copy
82 "aunmenu ToolBar.Paste
83 "aunmenu ToolBar.-sep3-
84 aunmenu ToolBar.Replace
85 aunmenu ToolBar.FindNext
86 aunmenu ToolBar.FindPrev
87 aunmenu ToolBar.-sep5-
88 aunmenu ToolBar.-sep6-
89 aunmenu ToolBar.RunCtags
90 aunmenu ToolBar.TagJump
91 "aunmenu ToolBar.-sep7-
92 aunmenu ToolBar.FindHelp
94 "an 1.295 ToolBar.-flexspace7-   <Nop>
99 " HIG insertion point related mappings
102 no   <D-Left>       <Home>
103 no!  <D-Left>       <Home>
104 no   <M-Left>       <C-Left>
105 no!  <M-Left>       <C-Left>
107 no   <D-Right>      <End>
108 no!  <D-Right>      <End>
109 no   <M-Right>      <C-Right>
110 no!  <M-Right>      <C-Right>
112 no   <D-Up>         <C-Home>
113 ino  <D-Up>         <C-Home>
114 map  <M-Up>         {
115 imap <M-Up>         <C-o>{
117 no   <D-Down>       <C-End>
118 ino  <D-Down>       <C-End>
119 map  <M-Down>       }
120 imap <M-Down>       <C-o>}
123 " This is so that the HIG shift movement related settings can be disabled by
124 " adding the line
125 "   let macvim_skip_hig_shift_movement = 1
126 " to the user .vimrc.
128 if !exists("macvim_skip_hig_shift_movement")
129   " Shift + special movement key (<S-Left>, etc.) and mouse starts insert mode
130   set selectmode=mouse,key
131   set keymodel=startsel,stopsel
133   " HIG related shift + special movement key mappings
134   nn   <S-D-Left>     <S-Home>
135   vn   <S-D-Left>     <S-Home>
136   ino  <S-D-Left>     <S-Home>
137   nn   <S-M-Left>     <S-C-Left>
138   vn   <S-M-Left>     <S-C-Left>
139   ino  <S-M-Left>     <S-C-Left>
141   nn   <S-D-Right>    <S-End>
142   vn   <S-D-Right>    <S-End>
143   ino  <S-D-Right>    <S-End>
144   nn   <S-M-Right>    <S-C-Right>
145   vn   <S-M-Right>    <S-C-Right>
146   ino  <S-M-Right>    <S-C-Right>
148   nn   <S-D-Up>       <S-C-Home>
149   vn   <S-D-Up>       <S-C-Home>
150   ino  <S-D-Up>       <S-C-Home>
152   nn   <S-D-Down>     <S-C-End>
153   vn   <S-D-Down>     <S-C-End>
154   ino  <S-D-Down>     <S-C-End>
155 endif " !exists("macvim_skip_hig_shift_movement")
160 " Menu key equivalents (these should always have the 'D' modifier set)
163 menukeyequiv File.New\ Window                       <D-n>
164 menukeyequiv File.New\ Tab                          <D-t>
166 menukeyequiv File.Open\.\.\.                        <D-o>
167 menukeyequiv File.Open\ Tab\.\.\.                   <D-T>
168 menukeyequiv File.Close\ Window                     <D-W>
169 "menukeyequiv File.Close\ Tab                        <D-w>
170 menukeyequiv File.Close                             <D-w>
171 menukeyequiv File.Save                              <D-s>
172 menukeyequiv File.Save\ As\.\.\.                    <D-S>
173 menukeyequiv File.Print                             <D-p>
175 menukeyequiv Edit.Undo                              <D-z>
176 menukeyequiv Edit.Redo                              <D-Z>
177 menukeyequiv Edit.Cut                               <D-x>
178 menukeyequiv Edit.Copy                              <D-c>
179 menukeyequiv Edit.Paste                             <D-v>
180 menukeyequiv Edit.Select\ All                       <D-a>
181 menukeyequiv Edit.Special\ Characters\.\.\.         <D-M-t> 
183 menukeyequiv Tools.Spelling.To\ Next\ error         <D-;>
184 menukeyequiv Tools.Spelling.Suggest\ Corrections    <D-:>
185 menukeyequiv Tools.Make                             <D-b>
186 menukeyequiv Tools.List\ Errors                     <D-l>
187 menukeyequiv Tools.List\ Messages                   <D-L>
188 menukeyequiv Tools.Next\ Error                      <D-C-Right>
189 menukeyequiv Tools.Previous\ Error                  <D-C-Left>
190 menukeyequiv Tools.Older\ List                      <D-C-Up>
191 menukeyequiv Tools.Newer\ List                      <D-C-Down>
193 menukeyequiv Window.Minimize                        <D-m>
194 menukeyequiv Window.Previous\ Tab                   <D-[>
195 menukeyequiv Window.Next\ Tab                       <D-]>
198 " Restore the previous value of 'cpoptions'.
199 let &cpo = s:cpo_save
200 unlet s:cpo_save