Unit 9: vi editor - Subjective Questions

CSE105 — Creative Engineering Workshop • Practice Questions with Detailed Answers

20 questions

1

Explain the different modes of operation in the vi editor. How does a user switch between them?

2

Describe the various ways to start the vi editor from the command line, including options to open at a specific line.

3

Explain the basic cursor navigation commands (h, j, k, l) in vi. Why were these keys chosen for movement?

4

Describe the word-based and line-based navigation commands available in vi with suitable examples.

5

Explain the scrolling commands in vi and distinguish between full-screen and half-screen scrolling.

6

Compare the various insert commands (i, I, a, A, o, O) used to enter insert mode in vi.

7

Explain the different editing/change commands in vi such as r, R, cw, cc, and s.

8

Describe the delete commands in vi with examples, including single-character, word, and line deletion.

9

Explain in detail the copy (yank) and paste operations in vi. Discuss how the buffer works during these operations.

10

Distinguish between the various save and exit operations in vi (:w, :q, :wq, :x, ZZ, :q!).

11

Define the vi editor and explain its significance as a standard Unix/Linux text editor.

12

Explain the concept of repeat counts (numeric prefixes) in vi commands with examples across navigation, deletion, and yanking.

13

Describe how search operations work in vi and how they aid navigation within a file.

14

Explain the substitute (search and replace) command in vi using the :s syntax with examples.

15

Distinguish between the command mode and insert mode in vi. Why is understanding this distinction important for beginners?

16

Explain the undo and redo commands in vi and their importance in the editing workflow.

17

Describe how to join lines, transpose characters, and change case in vi using command-mode operations.

18

Explain the concept of named and numbered buffers (registers) in vi and how they enhance copy-paste operations.

19

A student accidentally makes several unwanted changes to a file in vi and wants to exit without saving any of them. Explain the steps and the command used, and contrast it with saving.

20

Explain how marks work in vi and how they can be combined with navigation and editing commands.