Using background jobs to switch between Vim and terminal

Sometimes it is easier to ‘reuse’ one terminal session than opening another one. Let’s say that you did some changes and want to commit them. You don’t want to use any Vim plugin; just want to have more space to type commands.

With background jobs it is easy. Press Ctrl z and Vim will be send to a background job:

[1]  + 14351 suspended  nvim /Users/me/uber-file.md

Now the git part:

git status -s
git add .
git commit --fixup=f0f0f0

You can get back to Vim with:

fg

Which sends the most recent job to foreground.
To preview background jobs type: jobs

This protip has been written in 736 seconds