07/05/03 13:14:31
全体を下記の様に、修正したら今度は動作する。動いた理由と、前回
のが動かなかった理由が、さっぱり分からない。
下記に今回の内容を示します。
if exists("loaded_ShuffleB")
finish
endif
let loaded_ShuffleB=1
command! -nargs=? ShuffleB :call <sid>Map(<q-args>)
function! s:Map(...)
let b:pgname = ["b:One","b:Two","b:Three"]
let b:Prg = function(b:pgname[2])
call b:Prg(10)
imap <buffer> <silent> o O<c-o>:call b:Prg(31)<cr>
endfunction
function! b:One(current)
exec "normal o" . a:current . "最初はグー"
endfunction
function! b:Two(current)
exec "normal o" . a:current . "最初はチョキ"
endfunction
function! b:Three(current)
exec "normal o" . a:current . "最初はパー"
endfunction