Sometimes, in Vim, I want to show only a specific part of a file (for example, a specific method) while hiding the rest.
This helps me to focus at the problem at han
Similar to the already mentioned narrow plug-in, there's NrrwRgn. Visual select the region, :NR and the window is split with the selected region isolated in the new window. Very useful for coding, indeed.
Try the vim narrow plugin:
http://www.vim.org/scripts/script.php?script_id=2097
VIM also has the ability to fold code, but that may not map entirely to what you want.
<ESC>:help folding
Not quite up to speed on folding myself, but I believe that's the feature you're looking for.