I have this in my config file:
" flatten current directory, ie list all files in directory and its
" subdirectories and directories of subdirectories etc
command flatten :execute '!find -not -path "*/\.*" 2>/dev/null %%U'
command flat :execute '!find -not -path "*/\.*" 2>/dev/null %%U'
nnoremap fl :flat<cr>
" the same as flatten but display only files
command! flattenf :execute '!find -type f -not -path "*/\.*" 2>/dev/null %%U'
command! flatf :execute '!find -type f -not -path "*/\.*" 2>/dev/null %%U'
nnoremap ff :flatf<cr>
" the same as flatten but display only directories
command! flattend :execute '!find -type d -not -path "*/\.*" %%U'
command! flatd :execute '!find -type d -not -path "*/\.*" %%U'
nnoremap fd :flatd<cr>