DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Working with External Commands in Vim


Jump between vim and shell

You have 2 options to working on shell without leaving vi:

  1. ":sh" + "C-d": you don't know if you are in a "real" shell;

  2. "C-z" + "fg": you can check if you've suspended a vim with "jobs", recommended;

Insert outside text into vim buffer

  • from another file: ":r ";

  • from external command: ":r !", for example:

:r !ls -l|grep abc

Ref: https://www.linux.com/learn/tutorials/442419-vim-tips-working-with-external-commands



Published

Dec 11, 2013

Last Updated

Dec 11, 2013

Category

Tech

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor