Quick post! Hopefully useful as it's been for me.
Have you ever been caught in the loop of editing a file in vim (or any other editor), and then testing your changes quickly from the command line, and doing it over and over for dozens of times?
I have, many times. Sometimes you don't even need to do that. For example, vim allows you to invoke a command line tool with
Still, sometimes one falls into that vicious edit-run-edit cycle without thinking too much. If that's your case, here's a simple tip you can try. Note: you need to be on the console for this to work.
When you're done with your changes, save the file and then use
CTRL + Z to suspend the editor process and drop to the command line, where you will have your command waiting for you already.
Run the command, and then use
fg to return to the editor process exactly as you left it.
The edit-run cycle will be a lot faster.
fg (foreground) and
bg (background) are useful commands to "control the flow" of the processes you launch from the command line.