I have a function in vim8
as:
function! BSkipQuickFix(command)
let start_buffer = bufnr('%')
execute a:command
while &buftype ==# 'quickfix' && bufnr('%') != start_buffer
execute a:command
endwhile
endfunction
nnoremap <F12> :call BSkipQuickFix("bn")<CR>
nnoremap <S-F12> :call BSkipQuickFix("bp")<CR>
which I have converted to vim9 as:
def BSkipQuickFix(command: string): string
let start_buffer = bufnr('%')
execute a:command
while &buftype ==# 'quickfix' && bufnr('%') != start_buffer
execute a:command
endwhile
enddef
nnoremap <F12> : BSkipQuickFix("bn")<CR>
nnoremap <S-F12> : BSkipQuickFix("bp")<CR>
Now, I am getting E117: Unknown function: BSkipQuickFix
. Any help please?