1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- runtime autoload/lh/menu.vim
-
- let Data = {
- \ "variable": "bar",
- \ "idx_crt_value": 1,
- \ "values": [ 'a', 'b', 'c', 'd' ],
- \ "menu": { "priority": '42.50.10', "name": '&LH-Tests.&TogMenu.&bar'}
- \}
-
- call lh#menu#def_toggle_item(Data)
-
- let Data2 = {
- \ "variable": "foo",
- \ "idx_crt_value": 3,
- \ "texts": [ 'un', 'deux', 'trois', 'quatre' ],
- \ "values": [ 1, 2, 3, 4 ],
- \ "menu": { "priority": '42.50.11', "name": '&LH-Tests.&TogMenu.&foo'}
- \}
-
- call lh#menu#def_toggle_item(Data2)
-
-
- let Data3 = {
- \ "variable": "nodef",
- \ "texts": [ 'one', 'two', 'three', 'four' ],
- \ "values": [ 1, 2, 3, 4 ],
- \ "menu": { "priority": '42.50.12', "name": '&LH-Tests.&TogMenu.&nodef'}
- \}
- call lh#menu#def_toggle_item(Data3)
-
-
- let g:def = 2
- let Data4 = {
- \ "variable": "def",
- \ "values": [ 1, 2, 3, 4 ],
- \ "menu": { "priority": '42.50.13', "name": '&LH-Tests.&TogMenu.&def'}
- \}
- call lh#menu#def_toggle_item(Data4)
-
-
-
-
-
- function! s:getSNR()
- if !exists("s:SNR")
- let s:SNR=matchstr(expand("<sfile>"), "<SNR>\\d\\+_\\zegetSNR$")
- endif
- return s:SNR
- endfunction
-
- function! s:Yes()
- echomsg "Yes"
- endfunction
-
- function! s:No()
- echomsg "No"
- endfunction
- let Data4 = {
- \ "variable": "yesno",
- \ "values": [ 1, 2 ],
- \ "text": [ "No", "Yes" ],
- \ "actions": [ function(s:getSNR()."No"), function(s:getSNR()."Yes") ],
- \ "menu": { "priority": '42.50.20', "name": '&LH-Tests.&TogMenu.&yesno'}
- \}
- call lh#menu#def_toggle_item(Data4)
|