I got to know commands like ls -la | vim -
can be used to open Linux command output in vim.
- What does
-
mean after vim? - Is it some kind of special switch?
- Why doesn't simply using
ls -la | vim
works ?
from help --
:
Start editing a new buffer, which is filled with text that is read from stdin.
ls | vim
doesn't work, because vim reads it's commands from the terminal (as opposed to the content of a buffer)