comparison runtime/menu.vim @ 158:78423945b251

updated for version 7.0048
author vimboss
date Sat, 05 Feb 2005 21:39:53 +0000
parents 72aefd4c1e0d
children 8c60f65311fa
comparison
equal deleted inserted replaced
157:5242c44962c2 158:78423945b251
1 " Vim support file to define the default menus 1 " Vim support file to define the default menus
2 " You can also use this as a start for your own set of menus. 2 " You can also use this as a start for your own set of menus.
3 " 3 "
4 " Maintainer: Bram Moolenaar <Bram@vim.org> 4 " Maintainer: Bram Moolenaar <Bram@vim.org>
5 " Last Change: 2005 Jan 30 5 " Last Change: 2005 Feb 03
6 6
7 " Note that ":an" (short for ":anoremenu") is often used to make a menu work 7 " Note that ":an" (short for ":anoremenu") is often used to make a menu work
8 " in all modes and avoid side effects from mappings defined by the user. 8 " in all modes and avoid side effects from mappings defined by the user.
9 9
10 " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise 10 " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise
134 " Visual mode without the +virtualedit feature. They are pasted as if they 134 " Visual mode without the +virtualedit feature. They are pasted as if they
135 " were characterwise instead. Add to that some tricks to leave the cursor in 135 " were characterwise instead. Add to that some tricks to leave the cursor in
136 " the right position, also for "gi". 136 " the right position, also for "gi".
137 " Note: the same stuff appears in mswin.vim. 137 " Note: the same stuff appears in mswin.vim.
138 if has("virtualedit") 138 if has("virtualedit")
139 nnoremap <silent> <script> <SID>Paste :call <SID>Paste()<CR> 139 let s:paste_cmd = ":call <SID>Paste()<CR>"
140 func! <SID>Paste() 140 func! <SID>Paste()
141 let ove = &ve 141 let ove = &ve
142 set ve=all 142 set ve=all
143 normal `^ 143 normal `^
144 if @+ != '' 144 if @+ != ''
150 normal l 150 normal l
151 endif 151 endif
152 let &ve = ove 152 let &ve = ove
153 endfunc 153 endfunc
154 else 154 else
155 nnoremap <silent> <script> <SID>Paste "=@+.'xy'<CR>gPFx"_2x 155 let s:paste_cmd = "\"=@+.'xy'<CR>gPFx\"_2x"
156 endif 156 endif
157 157
158 " Use maps for items that are present both in Edit, Popup and Toolbar menu. 158 " Define the string to use for items that are present both in Edit, Popup and
159 " Toolbar menu.
159 if has("virtualedit") 160 if has("virtualedit")
160 vnoremap <script> <SID>vPaste "-c<Esc><SID>Paste 161 let s:paste_v_cmd = '"-c<Esc>' . s:paste_cmd
161 inoremap <script> <SID>iPaste <Esc><SID>Pastegi 162 let s:paste_i_cmd = '<Esc>' . s:paste_cmd . 'gi'
162 else 163 else
163 vnoremap <script> <SID>vPaste "-c<Esc>gix<Esc><SID>Paste"_x 164 let s:paste_v_cmd = '"-c<Esc>gix<Esc>' . s:paste_cmd . '"_x'
164 inoremap <script> <SID>iPaste x<Esc><SID>Paste"_s 165 let s:paste_i_cmd = 'x<Esc>' . s:paste_cmd . '"_s'
165 endif 166 endif
166 167
167 func! <SID>SelectAll() 168 func! <SID>SelectAll()
168 exe "norm gg" . (&slm == "" ? "VG" : "gH\<C-O>G") 169 exe "norm gg" . (&slm == "" ? "VG" : "gH\<C-O>G")
169 endfunc 170 endfunc
178 vnoremenu 20.340 &Edit.Cu&t<Tab>"+x "+x 179 vnoremenu 20.340 &Edit.Cu&t<Tab>"+x "+x
179 vnoremenu 20.350 &Edit.&Copy<Tab>"+y "+y 180 vnoremenu 20.350 &Edit.&Copy<Tab>"+y "+y
180 cnoremenu 20.350 &Edit.&Copy<Tab>"+y <C-Y> 181 cnoremenu 20.350 &Edit.&Copy<Tab>"+y <C-Y>
181 nnoremenu 20.360 &Edit.&Paste<Tab>"+gP "+gP 182 nnoremenu 20.360 &Edit.&Paste<Tab>"+gP "+gP
182 cnoremenu &Edit.&Paste<Tab>"+gP <C-R>+ 183 cnoremenu &Edit.&Paste<Tab>"+gP <C-R>+
183 vnoremenu <script> &Edit.&Paste<Tab>"+gP <SID>vPaste 184 exe 'vnoremenu <script> &Edit.&Paste<Tab>"+gP ' . s:paste_v_cmd
184 inoremenu <script> &Edit.&Paste<Tab>"+gP <SID>iPaste 185 exe 'inoremenu <script> &Edit.&Paste<Tab>"+gP ' . s:paste_i_cmd
185 nnoremenu 20.370 &Edit.Put\ &Before<Tab>[p [p 186 nnoremenu 20.370 &Edit.Put\ &Before<Tab>[p [p
186 inoremenu &Edit.Put\ &Before<Tab>[p <C-O>[p 187 inoremenu &Edit.Put\ &Before<Tab>[p <C-O>[p
187 nnoremenu 20.380 &Edit.Put\ &After<Tab>]p ]p 188 nnoremenu 20.380 &Edit.Put\ &After<Tab>]p ]p
188 inoremenu &Edit.Put\ &After<Tab>]p <C-O>]p 189 inoremenu &Edit.Put\ &After<Tab>]p <C-O>]p
189 if has("win32") || has("win16") 190 if has("win32") || has("win16")
779 vnoremenu 1.20 PopUp.Cu&t "+x 780 vnoremenu 1.20 PopUp.Cu&t "+x
780 vnoremenu 1.30 PopUp.&Copy "+y 781 vnoremenu 1.30 PopUp.&Copy "+y
781 cnoremenu 1.30 PopUp.&Copy <C-Y> 782 cnoremenu 1.30 PopUp.&Copy <C-Y>
782 nnoremenu 1.40 PopUp.&Paste "+gP 783 nnoremenu 1.40 PopUp.&Paste "+gP
783 cnoremenu 1.40 PopUp.&Paste <C-R>+ 784 cnoremenu 1.40 PopUp.&Paste <C-R>+
784 vnoremenu <script> 1.40 PopUp.&Paste <SID>vPaste 785 exe 'vnoremenu <script> 1.40 PopUp.&Paste ' . s:paste_v_cmd
785 inoremenu <script> 1.40 PopUp.&Paste <SID>iPaste 786 exe 'inoremenu <script> 1.40 PopUp.&Paste ' . s:paste_i_cmd
786 vnoremenu 1.50 PopUp.&Delete x 787 vnoremenu 1.50 PopUp.&Delete x
787 an 1.55 PopUp.-SEP2- <Nop> 788 an 1.55 PopUp.-SEP2- <Nop>
788 vnoremenu 1.60 PopUp.Select\ Blockwise <C-V> 789 vnoremenu 1.60 PopUp.Select\ Blockwise <C-V>
789 790
790 nnoremenu 1.70 PopUp.Select\ &Word vaw 791 nnoremenu 1.70 PopUp.Select\ &Word vaw
846 vnoremenu 1.70 ToolBar.Cut "+x 847 vnoremenu 1.70 ToolBar.Cut "+x
847 vnoremenu 1.80 ToolBar.Copy "+y 848 vnoremenu 1.80 ToolBar.Copy "+y
848 cnoremenu 1.80 ToolBar.Copy <C-Y> 849 cnoremenu 1.80 ToolBar.Copy <C-Y>
849 nnoremenu 1.90 ToolBar.Paste "+gP 850 nnoremenu 1.90 ToolBar.Paste "+gP
850 cnoremenu ToolBar.Paste <C-R>+ 851 cnoremenu ToolBar.Paste <C-R>+
851 vnoremenu <script> ToolBar.Paste <SID>vPaste 852 exe 'vnoremenu <script> ToolBar.Paste ' . s:paste_v_cmd
852 inoremenu <script> ToolBar.Paste <SID>iPaste 853 exe 'inoremenu <script> ToolBar.Paste ' . s:paste_i_cmd
853 854
854 if !has("gui_athena") 855 if !has("gui_athena")
855 an 1.95 ToolBar.-sep3- <Nop> 856 an 1.95 ToolBar.-sep3- <Nop>
856 an 1.100 ToolBar.Find :promptfind<CR> 857 an 1.100 ToolBar.Find :promptfind<CR>
857 vunmenu ToolBar.Find 858 vunmenu ToolBar.Find
994 an 50.720 &Syntax.&Highlight\ test :runtime syntax/hitest.vim<CR> 995 an 50.720 &Syntax.&Highlight\ test :runtime syntax/hitest.vim<CR>
995 an 50.730 &Syntax.&Convert\ to\ HTML :runtime syntax/2html.vim<CR> 996 an 50.730 &Syntax.&Convert\ to\ HTML :runtime syntax/2html.vim<CR>
996 997
997 endif " !exists("did_install_syntax_menu") 998 endif " !exists("did_install_syntax_menu")
998 999
1000 unlet! s:paste_i_cmd s:paste_v_cmd s:paste_cmd
1001
999 " Restore the previous value of 'cpoptions'. 1002 " Restore the previous value of 'cpoptions'.
1000 let &cpo = s:cpo_save 1003 let &cpo = s:cpo_save
1001 unlet s:cpo_save 1004 unlet s:cpo_save
1002 1005
1003 " vim: set sw=2 : 1006 " vim: set sw=2 :