0

I have a function for generating tags via ctags:

:function! UpdateCtags()
    if !has('linux')
        echohl ErrorMsg | echo 'This function only supports running under the linux operating system.' | echohl None
        return
    endif

    echo 'Generating labels...'
    let output = system('ctags -f ' . g:tags_file .  ' -R /usr/include')
    if v:shell_error == 0
        echo 'Generated labels successfully.'
    else
        echohl ErrorMsg | echo output | echohl None
    endif
:endfunction

I want to simply execute the UpdateCtags function through multiple threads, how can I do this?

My neovim version:

$ nvim -v
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
aszswaz
  • 609
  • 3
  • 10

0 Answers0