There are several ways to do that. To get the output of that command into a Vim buffer, open Vim and execute
:r!find . type f
Another way to do that, using vim in a terminal, would be to execute the following at the shell prompt.
$ find . type f | vim -
I usually put the cursor over the desired file name and type
<C-W>f
where <C-W> means Ctrl-W. That will open the file in a new window, which avoids the problem of trying to open a new file in a modified buffer.
Another approach would be to first execute
:set nomodified
Then type
gf
That will open the new file in the buffer/window that contained the list of files.
Still another way would be to again put the cursor over the desired file name and execute
:e! <C-R>f<CR>
where <C-R> means Ctrl-R and <CR> means the Enter key. The <C-R>f combination will expand to the file name under the cursor.
See
:help :r!
:help CTRL-W_f
:help gf
:help 'modified'
:help c_CTRL-R_f
Even before that how do i get the file list in vim? – woodstok – 2013-08-21T15:23:32.067
Probably with
:r!find . type f
. See:help :r!
. I'll update the answer. – garyjohn – 2013-08-21T15:26:07.327@MIkhail: If he starts from the command line and not from within an open Vim session, perhaps he is running
find . -type f | vim -
. This will grab STDIN and put it into the buffer. – Daniel Andersson – 2013-08-21T15:27:19.227