Stop learning alone!

Learn faster and stay on-track by joining this free class with other self-learners.

Register for Learning Vim from the inside now.

Learning Vim from the inside

Open Ended Class

Creator: pbr

Status: Established

Join this class!

Lesson 4: Assignment 2

The codebauer project

(sounds like a movie from the '80s) Codebauer wrote: Buffers, tabs, multiple file handling and jumping between files... Gets my vote


This makes awesome sense as an early exploratory because we can all leverage the skills and knowledge we gain here for future exploratory efforts.

So let's dive right in - here are some questions to guide your exploration:

  • Whats the difference between a buffer and a window?
  • What are the main states a buffer can be in?
  • What are the main states a window can be in?
  • What's the name of the little window at the bottom of the screen?
  • What are tabs in Vim? What's the -p option all about?

Here are some Vim Usage questions:

  • How can you list all of the opened files in the currently running Vim process?

  • How can you open a second window with the next file listed on the commandline?

  • How can you open all files listed on the command line in separate windows?

Homework Submissions

1 total

pbr (Self-grade: Pretty good)
Submitted 1 year ago | Permalink

OK so I guess we need to jump-start this one. Here goes.

* Whats the difference between a buffer and a window?

This one I'm not going to give away; do a little research, it's not hard.

* What are the main states a buffer can be in?

See snippet of buffer.c below

* What are the main states a window can be in?

OK so this one's tougher... no easy answer from what I can see. Rendered-vs-hidden? Folded? What's a frame vs. a window?

* What's the name of the little window at the bottom of the screen?

They refer to it as the "command line"

* What are tabs in Vim? What's the -p option all about?

Also left as exercises for students.

/* from buffer.c
 *
 * Each buffer can be in one of these states:
 * never loaded: BF_NEVERLOADED is set, only the file name is valid
 *   not loaded: b_ml.ml_mfp == NULL, no memfile allocated
 *       hidden: b_nwindows == 0, loaded but not displayed in a window
 *       normal: loaded and displayed in a window
 */