If you need those for a custom command that takes filetype arguments, you can just use :command -complete=filetype
. Else, you can derive the list via the globpath()
function yourself:
echo join(map(split(globpath(&rtp, 'ftplugin/*.vim'), '\n'), 'fnamemodify(v:val, ":t:r")'), "\n")
This gets all ftplugin scripts from the runtimepath, and then modifies the filespec via fnamemodify()
to only list the root of the filename. split()
converts into a List, and join()
back to lines for :echo
ing.