List all filetype plugins known to Vim
--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Underwater World
--
Chapters
00:00 List All Filetype Plugins Known To Vim
00:17 Accepted Answer Score 19
00:46 Thank you
--
Full question
https://superuser.com/questions/664638/l...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#vim #filetype
#avk47
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Underwater World
--
Chapters
00:00 List All Filetype Plugins Known To Vim
00:17 Accepted Answer Score 19
00:46 Thank you
--
Full question
https://superuser.com/questions/664638/l...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#vim #filetype
#avk47
ACCEPTED ANSWER
Score 19
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.