3

Not seeing function definitions all over the place would make my code much more readable.

Is there a way to hide them in vim?

octosquidopus
  • 3,517
  • 8
  • 35
  • 53

1 Answers1

8

You're looking for folding.

http://vim.wikia.com/wiki/Folding

Fold function in vim

It allows you to "fold" lines of text into a single line and unfold them later.

Community
  • 1
  • 1
Praxeolitic
  • 22,455
  • 16
  • 75
  • 126
  • 1
    I was hoping for an automatic solution, as manually folding and unfolding can be tedious after a while. – octosquidopus Dec 08 '14 at 14:04
  • 4
    The linked SO question has some good suggestions. In particular, `:set foldmethod=syntax` or `:set foldmethod=indent` with `foldlevel` will automate this. – Praxeolitic Dec 08 '14 at 14:06