示例(link)给出:
E107: Missing parentheses: <SNR>17_StartZekyll
(对于示例的精确副本,它是:E107: Missing parentheses: <SNR>16_AppFunction
下面是我剥离的,忠实的版本,我删除了注释和多点部分(“......无论......”)和修改了第一个键绑定。)
有什么不对?
" ------------------------------------------------------------------------------
" Exit when your app has already been loaded (or "compatible" mode set)
if exists("g:loaded_zekyll") || &cp
finish
endif
let g:loaded_zekyll = 1 " your version number
let s:keepcpo = &cpo
set cpo&vim
" Public Interface:
if !hasmapto('<Plug>StartZekyll')
map <unique> <Leader>c <Plug>StartZekyll
endif
" Global Maps:
"
map <silent> <unique> <script> <Plug>StartZekyll :set lz<CR>:call <SID>StartZekyll<CR>:set nolz<CR>
" Script Variables:
let s:repos_paths = [ $HOME."/.zekyll/repos" ]
" ------------------------------------------------------------------------------
" s:StartZekyll: this function is available via the <Plug>/<script> interface above
fun! s:StartZekyll()
" content here
nmap <silent> <Left> :set lz<CR>:silent! call <SID>StartZekyll2<CR>:set nolz<CR>
call s:render()
endfun
fun! s:render()
endfun
" ------------------------------------------------------------------------------
let &cpo=s:keepcpo
unlet s:keepcpo
答案 0 :(得分:0)
作为示例给出的映射错过了call
命令的一些括号。你必须纠正
map ... call <SID>StartZekyll<CR> ...
使用:
map ... call <SID>StartZekyll()<CR> ...
在你定义的两个映射中。