Is there a better way to do this in vim
I like the command line completion that lets me quickly get a full path out. So I use the :!ls and tab to quickly get the path I am looking for.
:!ls /usr/share/doc/
up arrow get it on the command line again, accessing the command line history.
:!ls /usr/share/doc/
Then I edit it like so
:r! echo "/usr/share/doc/"
Because I want to put the path into file and not the contents of the directory. Basically a quick way to put the contents of the command-line history into a file.