til / Suspending vim
Occasionally, when you’re working in vim, you might need to run a one-off terminal command. This is a perfect use case for vim’s suspend command. Type ctrl + z
to send vim to the background and bring the terminal to the front. I like to think comic book sleeping, “Zzz," to remember the command.
Once you’re ready to get back to work, type fg
(foreground) in the terminal to bring up vim.
You can also use :sus
, :suspend
, :st
, or :stop
, which all map to the same command.
- Ben Frain. (2021-09-17). “neovim — advanced tricks: volume one”. Link