Advanced

Vim tips: Folding fun

Posted by grouch on · 1 comment
Linux.com; By Joe 'Zonker' Brockmeier
Mail this story
Print this story

The problem with writing and editing on a computer, versus having words on paper, is that it's usually hard to compare text from different sections of a document when they don't fit on the screen together. One way to do it is to use Vim's viewports feature. Another is to "fold" the text. Using Vim's folding features, you can tuck away portions of a file's text so that they're out of sight until you want to work with them again. Here's how.

Full Story

  Nav
» Read more about: Story Type: News Story, Tutorial; Groups: GNU

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (1)

Makes moving large blocks of code a snap.

Only, it isn't supported for C or C++ under version 6... but the version 7 syntax file (c.vim) will work also if you drop it into v.6, and it supports folding... for both C and C++.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post