![]() ![]() Make sure you’re in normal mode, and type zf2j. Open it in Vim, and place the cursor at the beginning of a paragraph. Pick a text file, preferably a longer one like your nf, or just about any text file that’s too big to fit on the screen by itself. Let’s start with some simple folding actions. ![]() (Since Vim 7 added spellchecking, some of the spellcheck commands also start with z, but that’s a topic for another article.) If you want to do something with folding, it probably starts with z. OK, maybe not much, but at least the commands are consistent. ![]() Vim’s folding commands begin with z - which, as the Vim docs point out, sort of looks like a folded piece of paper. 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. One way to do it is to use Vim’s viewports feature. 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. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |