1

:scriptnames can list all plugins installed in my vim.
How to write the output of scriptnames into a file?

:scriptnames > names.txt

It can't do the trick.

Martin Tournoij
  • 62,054
  • 25
  • 192
  • 271
showkey
  • 1,130
  • 2
  • 11
  • 30

2 Answers2

4

this can be done with redir >names.txt|silent scriptnames|redir END

I'm using silent here to avoid a -- more -- -prompt.

Naumann
  • 2,759
  • 1
  • 11
  • 16
4

If you just want to list them in a buffer, there is

:new
:put=execute('scriptnames')

If you need to search, well, there is filter()

:echo filter(split(execute('scriptnames'), "\n"), 'v:val =~ "syntax"')
Luc Hermitte
  • 17,351
  • 1
  • 33
  • 49