I would like to debug functions a bit more easily. Instead of running them and having to do:
To actually just have a
vim.log file opened and tail -f'ed so I can see the output while it's running, without having to keep going into and out of messages and such.
Is there a way to do this? For example, in the following function:
func Toggle2 () echom 'start toggle2...' echom 'end toggle2...' endfunc
I would essentially like to do:
- Output goes to
vim.logfor this function
- But I don't want all the other vim-related messages. Just this function.
How could this be done? I tried doing the following:
func Toggle2 () call execute('redir > vim.log') echom 'start toggle2...' echom 'end toggle2...' call execute('redir END') endfunc
But received the following error:
E930: Cannot use :redir inside execute()