Posts with the tag Vim:

Vim's: w and: r useful tips

At the beginning Vim has the :wand :rcommands. I think many people know the command itself. It’s a little convenient for me, so I’ll introduce it. :r :r banana.txtWill read the contents of the file and insert it on the next line of the current cursor. You can also specify the lines that can be inserted. In that case :{lnum}r banana.txt, enter the line number at the beginning. This is the best choice, but you can actually :r !{cmd}insert the command output with. This is useful, for example, if you want to edit the API response a bit with Vim, or if you want to insert the command execution result into an article.