From discussion in comments I learned that OP has a custom vimgrep call and would like to run it asynchronously. The utility of this is pretty clear, especially if you run a lot of searches that take a while: by moving the execution into a separate/background thread you free up Vim's UI so you can continue working without waiting for the result.
As I ...
I guess mouse clicks don't update the jump list. (:help jump-motions seems to confirm this is the case.)
Try this, for the async solution:
autocmd FocusLost * set mouse=
autocmd FocusGained * call timer_start(200, 'ReenableMouse')
Note that this ...
Update: neovim now (January 2020) supports perl as well as has('perl'). I update neovim very often to the latest development version, and I only noticed the feature today when running checkhealth. If you are using a stable version of neovim, you probably will not see support for perl yet.
Neovim is always compiled with all the features, so rebuilding won't help you: Perl support simply isn't included in the version of Neovim you are running. See (:help feature-compile, :help nvim-features-missing).
However, later versions of Neovim do include Perl support, so upgrading will add this feature for you.
As for your other question about Python, ...
If you want to perform asynchronous tasks from Vim, people generally recommend using the vim-dispatch plugin to run external processes in the background and call back later.
But since I don't have an example for that, I'm going to offer some dirty synchronous tricks instead...
You could consider only doing the work when the user has gone idle, by waiting ...
vim-dispatch :Make instead of :make
You cannot run the built-in command :make asynchronously in Vim8 or NeoVim.
You have to take the value of 'makeprg' and insert it into vim8 job_start() or neovim jobstart().
I personally like the convenience of plugins which take care of vim8/neovim differences, parsing the result and inserting it into the quickfix/...
This question is largely addressing some follow-up questions OP had in response to an answer I gave to another question that they posted. This one also talks about a solution involving lambda functions and closures that is valid but more complicated than needed for most use cases. For both those reasons I recommend you check out that Q&A first: How to ...
Tested on Vim Version: 8.2.1537
A timer's resources will be freed on one of three conditions:
the timer_stop() function in Vim is called, invoking it's counterpart stop_timer() in the C source.1
after invoking the callback function, there are no repetitions left for the timer, upon which free_timer() is invoked.2
the timer has encountered an ...
Is it possible to call a vim script function with the help of job_start?
Not directly. I guess you would need Vim to be multithreaded, which might be possible in the future.
In fact I've used the command :vimgrep to make my custom grep. It worked. Now I starts to use vim 8 so I'm thinking if it's possible to make my custom grep async.
FWIW, I wrote some ...
There are currently two great plugins I found that can run commands asynchronously: vim-dispatch and asyncrun.vim. The two plugins have async support for both Neovim and Vim, but you have to make sure you have relatively new versions of Neovim or Vim (see their home for exact version requirements.)