官术网_书友最值得收藏!

  • Mastering Vim
  • Ruslan Osipov
  • 181字
  • 2021-06-10 18:51:27

Organizing workspace

So far, we've only worked with a single file in Vim. When working with code, you usually have to work with multiple files at once, switching back and forth, making edits across multiple files, and looking up certain bits somewhere else. Luckily, Vim provides an extensive way to deal with many files:

  • Buffers are the way Vim internally represents files; they allow you to switch between multiple files quickly
  • Windows organize the workspace by displaying multiple files next to each other
  • Tabs are a collection of windows
  • Folds allow you to hide and expand certain portions of files, making large files easier to navigate

Here's a screenshot illustrating the preceding points:

Let's understand the content in the screenshot:

  • Multiple files (labeled farm.py, animals/cat.py, and animal_farm.py) are open as windows
  • The bar at the top (listing 3 farm.py and a/dog.py) indicates the tabs
  • Lines starting with +-- indicate folds, hiding away portions of a file

This section will go over windows, tabs, and folds in detail, and you'll be able to comfortably work with as many files as you need.

主站蜘蛛池模板: 肃北| 四川省| 如皋市| 元朗区| 吉安市| 区。| 临猗县| 东莞市| 阳泉市| 威海市| 剑川县| 鄂托克旗| 太和县| 平和县| 鹰潭市| 东乌珠穆沁旗| 池州市| 藁城市| 息烽县| 信阳市| 大埔县| 石景山区| 延津县| 绥阳县| 洞口县| 长子县| 鄂尔多斯市| 福州市| 安乡县| 湘潭县| 建德市| 台南市| 镇坪县| 天等县| 德保县| 夏河县| 酒泉市| 如皋市| 昌邑市| 平和县| 新民市|