I've seen magical Vim commands before that you could add to your .vimrc to have folds created upon opening a particular type of file. I remember having such code that would create the folds, upon opening the file, at every Ruby method and class. Then, with one command, I could collapse all those method folds. Does anyone know how to do this with inline views in PL/SQL? Say I have the following SQL:
SELECT blah,
teh_max
FROM (
SELECT blah,
MAX(bar) AS teh_max
FROM (
SELECT blah,
bar
FROM foo
)
GROUP BY blah
)
ORDER BY blah
I would like folds to be created when I open this in Vim so that I can go to a FROM (
line, hit zc
in command mode, and have the inline view starting at that line be collapsed. It would be nice to collapse all the folds with one command, too.