1" 2" cream-menu-popup.vim 3" 4" Cream -- An easy-to-use configuration of the famous Vim text editor 5" [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall 6" 7" License: 8" This program is free software; you can redistribute it and/or modify 9" it under the terms of the GNU General Public License as published by 10" the Free Software Foundation; either version 3 of the License, or 11" (at your option) any later version. 12" [ http://www.gnu.org/licenses/gpl.html ] 13" 14" This program is distributed in the hope that it will be useful, but 15" WITHOUT ANY WARRANTY; without even the implied warranty of 16" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17" General Public License for more details. 18" 19" You should have received a copy of the GNU General Public License 20" along with this program; if not, write to the Free Software 21" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 22" 02111-1307, USA. 23" 24 25" Note: This is functionalized so we can re-set it with a call. 26 27function! Cream_menu_popup() 28 29 " destroy existing popup menu 30 silent! unmenu PopUp 31 silent! unmenu! PopUp 32 33 " add blank line only prior to version 6.1.433 34 if version < 601 || version == 601 && !exists("patch433") 35 anoremenu <silent> 100 PopUp.\ <Nul> 36 anoremenu <silent> 101 PopUp.-Sep101- <Nul> 37 endif 38 anoremenu <silent> 111 PopUp.&Undo :call Cream_undo("i")<CR> 39 40 vmenu <silent> 113 PopUp.Cu&t :<C-u>call Cream_cut("v")<CR> 41 vmenu <silent> 114 PopUp.&Copy :<C-u>call Cream_copy("v")<CR> 42 43 vmenu <silent> 115 PopUp.&Paste :<C-u>call Cream_paste("v")<CR> 44 imenu <silent> 116 PopUp.&Paste <C-b>:call Cream_paste("i")<CR> 45 46 vmenu <silent> 117 PopUp.&Delete :<C-u>call Cream_delete()<CR> 47 48 "anoremenu <silent> 118 PopUp.-Sep108- <Nul> 49 anoremenu <silent> 119 PopUp.Select\ &All :call Cream_select_all()<CR> 50 51endfunction 52call Cream_menu_popup() 53 54