The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Code folding in vim

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Bryan Liles

Posts: 228
Nickname: bryanl
Registered: May, 2008

Bryan Liles is the Principal Web Developer for Sourcefire, Inc.
Code folding in vim Posted: Apr 5, 2009 7:42 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Bryan Liles.
Original Post: Code folding in vim
Feed Title: Smarticus
Feed URL: http://smartic.us/feed/atom.xml
Feed Description: Ramblings of a ruby hacker
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Bryan Liles
Latest Posts From Smarticus

Advertisement

I’ve been pushing off learning code folding in vim for a few weeks now. I ended that procrastination and I present to you a short tutorial on code folding in vim.


Code folding in vim from Bryan Liles on Vimeo.

The import things to remember here are to get your settings correct:

"folding settings
set foldmethod=indent   "fold based on indent
set foldnestmax=10      "deepest fold is 10 levels
set nofoldenable        "dont fold by default
set foldlevel=1         "this is just what i use

Then you can toggle folding with za. You can fold everything with zM and unfold everything with zR. zm and zr can be used to get those folds just right. Always remember the almighty help file at “help :folding” if you get stuck.

Happy hacking

Read: Code folding in vim

Topic: Free Flex IDE (PE) v Flex Visual Design Environment (Pro) Previous Topic   Next Topic Topic: Creating ctags with git hooks

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use