I am using mvim and I would like to fold the class Experiment. How do I do that?
class Lab
def method1
end
class Experiment
def method2
end
end # end of class Experiment
end # end of class Lab
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’d like to fold a specific number of lines use
zfand then a motion command. For example, if you wanted to fold all the lines inclass Experiment, put your cursor onto the line readingdef method2, and typezf2j.zfis the fold command,2is the number of lines to fold below the current one, andjindicates a downward cursor motion. The result will look like this:You can also use visual line mode to select what you’d like to fold and then type
zato fold/un-fold.