Gotta love NeoVim's terminal! For simple projects, it can replace a lot of what dedicated plugins do, not to mention external dependencies like file watchers.

![kvdev](/assets/img/kv.png)

Here is a TDD recipe for a small project. No plugins used:

Start nvim

nvim feature.py

Split a new terminal vertically

:vsp | :terminal

Get the terminal's job id.

<C-[>
:echo b:terminal_job_id
3

Switch to the other window

<C-[>
<C-w>w

Add an autocmd that sends a command to the terminal to run the tests. The job id is used here.

:au BufWritePost <buffer> :call jobsend(3, "\<C-c>clear\<CR>python3 feature_test.py\<CR>")
# do tdd

Clean up the buffer's autocmd. Run on the code window.

:au! * <buffer>