To get a view of all function definitions in a file I type :g/function/#
Vim displays each line with the word "function" in a small "message window". I'd like to have my defined syntax hightlighting applied to this output. Possible?
To get a view of all function definitions in a file I type :g/function/#
Vim displays each line with the word "function" in a small "message window". I'd like to have my defined syntax hightlighting applied to this output. Possible?
Highlighting messages as output by :print and similar isn't possible.
But, you could
:let output = execute('global/function/#')->split('\n'))Alternately, :vimgrep function % (normally /function/, but since there are no pattern characters this is fine). Then use the quickfix features to navigate and have syntax highlighting directly in the actual buffer.