Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> you can then use "%!ls" to replace the contents of the buffer with directory listing and edit the commands you want.

I often used :r !ls for that, thanks for the tip + it's shorter



Note that in general this is not a one-to-one replacement. `%!cmd` sends the current buffer contents to `cmd`’s stdin and replaces the buffer with `cmd`’s output. In the case of ‘ls’ this works since it doesn’t take anything on stdin




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: