Fix placement of auxiliary IM window for Core Text
[MacVim.git] / src / MacVim / gvimrc
blob84df752d1c457f58848ddf37542f4352e5308da2
1 " System gvimrc file for MacVim
3 " Maintainer:   Bjorn Winckler <bjorn.winckler@gmail.com>
4 " Last Change:  Sun Aug 29 2009
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
29 " To make tabs more readable, the label only contains the tail of the file
30 " name and the buffer modified flag.
31 set guitablabel=%M%t
33 " Send print jobs to Preview.app.  This does not delete the temporary ps file
34 " that is generated by :hardcopy.
35 set printexpr=system('open\ -a\ Preview\ '.v:fname_in)\ +\ v:shell_error
38 " This is so that HIG Cmd and Option movement mappings can be disabled by
39 " adding the line
40 "   let macvim_skip_cmd_opt_movement = 1
41 " to the user .vimrc
43 if !exists("macvim_skip_cmd_opt_movement")
44   no   <D-Left>       <Home>
45   no!  <D-Left>       <Home>
46   no   <M-Left>       <C-Left>
47   no!  <M-Left>       <C-Left>
49   no   <D-Right>      <End>
50   no!  <D-Right>      <End>
51   no   <M-Right>      <C-Right>
52   no!  <M-Right>      <C-Right>
54   no   <D-Up>         <C-Home>
55   ino  <D-Up>         <C-Home>
56   map  <M-Up>         {
57   imap <M-Up>         <C-o>{
59   no   <D-Down>       <C-End>
60   ino  <D-Down>       <C-End>
61   map  <M-Down>       }
62   imap <M-Down>       <C-o>}
64   imap <M-BS>         <C-w>
65   imap <D-BS>         <C-u>
66 endif " !exists("macvim_skip_cmd_opt_movement")
69 " This is so that the HIG shift movement related settings can be enabled by
70 " adding the line
71 "   let macvim_hig_shift_movement = 1
72 " to the user .vimrc (not .gvimrc!).
74 if exists("macvim_hig_shift_movement")
75   " Shift + special movement key (<S-Left>, etc.) and mouse starts insert mode
76   set selectmode=mouse,key
77   set keymodel=startsel,stopsel
79   " HIG related shift + special movement key mappings
80   nn   <S-D-Left>     <S-Home>
81   vn   <S-D-Left>     <S-Home>
82   ino  <S-D-Left>     <S-Home>
83   nn   <S-M-Left>     <S-C-Left>
84   vn   <S-M-Left>     <S-C-Left>
85   ino  <S-M-Left>     <S-C-Left>
87   nn   <S-D-Right>    <S-End>
88   vn   <S-D-Right>    <S-End>
89   ino  <S-D-Right>    <S-End>
90   nn   <S-M-Right>    <S-C-Right>
91   vn   <S-M-Right>    <S-C-Right>
92   ino  <S-M-Right>    <S-C-Right>
94   nn   <S-D-Up>       <S-C-Home>
95   vn   <S-D-Up>       <S-C-Home>
96   ino  <S-D-Up>       <S-C-Home>
98   nn   <S-D-Down>     <S-C-End>
99   vn   <S-D-Down>     <S-C-End>
100   ino  <S-D-Down>     <S-C-End>
101 endif " exists("macvim_hig_shift_movement")
104 " Restore the previous value of 'cpoptions'.
105 let &cpo = s:cpo_save
106 unlet s:cpo_save