Monday, September 27, 2010

Executing commands in shell and accepting the output in Vim

Source: http://www.linux.com/archive/feed/57727

:r ! ls

It is also possible to select certain lines in Vim with v, V or ctrl+v and send it to a Bash command. The selected lines (input for Bash command) will be replaced by the output from Bash. Typical line number specification is also allowed.

:5,7 ! xargs ls -alh

0 comments:

Post a Comment