hanki.dev

Pipe output directly to vim

In my last blog post about checking Maven dependency versions I recommended to output the results to a temporary .txt file. This was way you can open the file with vim, or whichever text editor you prefer, instead of browsing through the terminal windows. My brother pointed out that you can pipe the output directly to vim, without creating useless file!

mvn versions:display-dependency-updates | vim -

Note that the - at the end is required. You can exit the file with :q!

#terminal