Preface |
|
xv | |
Part I vi and Vim Fundamentals |
|
|
|
3 | (12) |
|
Text Editors and Text Editing |
|
|
3 | (4) |
|
|
3 | (3) |
|
|
6 | (1) |
|
A Brief Historical Perspective |
|
|
7 | (2) |
|
Opening and Closing Files |
|
|
9 | (4) |
|
Opening a File from the Command Line |
|
|
9 | (1) |
|
Opening a File from the GUI |
|
|
10 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
Saving and Quitting a File |
|
|
12 | (1) |
|
Quitting Without Saving Edits |
|
|
13 | (2) |
|
|
13 | (1) |
|
|
14 | (1) |
|
|
15 | (26) |
|
|
16 | (1) |
|
Moving the Cursor in Command Mode |
|
|
17 | (6) |
|
|
18 | (2) |
|
|
20 | (1) |
|
|
20 | (2) |
|
|
22 | (1) |
|
|
23 | (13) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
25 | (3) |
|
|
28 | (1) |
|
|
28 | (4) |
|
|
32 | (1) |
|
|
33 | (1) |
|
Repeating or Undoing Your Last Command |
|
|
34 | (2) |
|
|
36 | (1) |
|
Numeric Arguments for Insert Commands |
|
|
37 | (1) |
|
|
37 | (1) |
|
Problems with vi Commands |
|
|
38 | (1) |
|
|
38 | (1) |
|
Review of Basic vi Commands |
|
|
39 | (2) |
|
3 Moving Around in a Hurry |
|
|
41 | (14) |
|
|
41 | (5) |
|
|
42 | (1) |
|
Repositioning the Screen with z |
|
|
43 | (1) |
|
|
43 | (1) |
|
|
44 | (1) |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
47 | (4) |
|
|
48 | (2) |
|
|
50 | (1) |
|
|
51 | (1) |
|
|
52 | (1) |
|
Review of vi Motion Commands |
|
|
52 | (3) |
|
|
55 | (10) |
|
More Command Combinations |
|
|
55 | (1) |
|
Options When Starting vi and Vim |
|
|
56 | (4) |
|
Advancing to a Specific Place |
|
|
57 | (1) |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
60 | (2) |
|
|
60 | (1) |
|
Yanking to Named Registers |
|
|
61 | (1) |
|
|
62 | (1) |
|
|
63 | (1) |
|
Review of Register and Marking Commands |
|
|
63 | (2) |
|
5 Introducing the ex Editor |
|
|
65 | (20) |
|
|
66 | (2) |
|
|
68 | (1) |
|
Problem Getting to Visual Mode |
|
|
68 | (1) |
|
|
68 | (6) |
|
|
69 | (1) |
|
Defining a Range of Lines |
|
|
69 | (2) |
|
|
71 | (1) |
|
|
72 | (1) |
|
Redefining the Current Line Position |
|
|
73 | (1) |
|
|
73 | (1) |
|
|
74 | (1) |
|
|
74 | (3) |
|
|
76 | (1) |
|
|
76 | (1) |
|
Appending to a Saved File |
|
|
76 | (1) |
|
Copying a File into Another File |
|
|
77 | (1) |
|
|
77 | (4) |
|
Invoking Vim on Multiple Files |
|
|
78 | (1) |
|
|
78 | (1) |
|
|
79 | (1) |
|
|
79 | (1) |
|
Switching Files from Command Mode |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
81 | (4) |
|
|
85 | (28) |
|
|
85 | (1) |
|
|
86 | (2) |
|
Doing Things Globally Across the File |
|
|
88 | (1) |
|
Context-Sensitive Replacement |
|
|
88 | (1) |
|
|
89 | (8) |
|
Metacharacters Used in Search Patterns |
|
|
90 | (2) |
|
POSIX Bracket Expressions |
|
|
92 | (2) |
|
Metacharacters Used in Replacement Strings |
|
|
94 | (2) |
|
|
96 | (1) |
|
Pattern-Matching Examples |
|
|
97 | (9) |
|
Search for General Class of Words |
|
|
98 | (1) |
|
|
99 | (1) |
|
|
100 | (6) |
|
A Final Look at Pattern Matching |
|
|
106 | (7) |
|
Deleting an Unknown Block of Text |
|
|
106 | (1) |
|
Switching Items in a Textual Database |
|
|
107 | (2) |
|
Using :g to Repeat a Command |
|
|
109 | (1) |
|
|
110 | (3) |
|
|
113 | (44) |
|
|
114 | (4) |
|
|
114 | (2) |
|
|
116 | (1) |
|
|
116 | (1) |
|
|
117 | (1) |
|
|
118 | (4) |
|
Filtering Text Through a Command |
|
|
120 | (2) |
|
|
122 | (14) |
|
|
122 | (2) |
|
|
124 | (1) |
|
|
125 | (1) |
|
Protecting Keys from Interpretation by ex |
|
|
125 | (1) |
|
A Complex Mapping Example |
|
|
126 | (2) |
|
More Examples of Mapping Keys |
|
|
128 | (2) |
|
Mapping Keys for Insert Mode |
|
|
130 | (1) |
|
|
131 | (1) |
|
Mapping Other Special Keys |
|
|
132 | (2) |
|
Mapping Multiple Input Keys |
|
|
134 | (1) |
|
|
135 | (1) |
|
Executing Registers from ex |
|
|
136 | (1) |
|
|
136 | (7) |
|
Looping in a Shell Script |
|
|
137 | (2) |
|
|
139 | (1) |
|
Sorting Text Blocks: A Sample ex Script |
|
|
140 | (2) |
|
|
142 | (1) |
|
|
142 | (1) |
|
Editing Program Source Code |
|
|
143 | (14) |
|
|
143 | (3) |
|
|
146 | (1) |
|
|
147 | (1) |
|
|
148 | (9) |
Part II Vim |
|
|
8 Vim (vi Improved): Overview and Improvements over vi |
|
|
157 | (26) |
|
|
158 | (1) |
|
|
159 | (5) |
|
|
159 | (1) |
|
|
160 | (1) |
|
Compare and Contrast with vi |
|
|
160 | (1) |
|
|
161 | (3) |
|
|
164 | (1) |
|
Aids and Easy Modes for New Users |
|
|
164 | (1) |
|
|
165 | (2) |
|
Startup and Initialization Options |
|
|
167 | (7) |
|
|
167 | (3) |
|
Behaviors Associated to Command Name |
|
|
170 | (1) |
|
System and User Configuration Files |
|
|
171 | (1) |
|
|
172 | (2) |
|
|
174 | (2) |
|
|
175 | (1) |
|
Extended Regular Expressions |
|
|
176 | (4) |
|
|
180 | (1) |
|
|
181 | (1) |
|
|
181 | (1) |
|
|
181 | (2) |
|
|
183 | (30) |
|
General Introduction to gvim |
|
|
184 | (6) |
|
|
184 | (2) |
|
|
186 | (2) |
|
|
188 | (2) |
|
Customizing Scrollbars, Menus, and Toolbars |
|
|
190 | (12) |
|
|
190 | (1) |
|
|
191 | (8) |
|
|
199 | (3) |
|
|
202 | (1) |
|
gvim in Microsoft Windows |
|
|
202 | (1) |
|
gvim in the X Window System |
|
|
203 | (1) |
|
Running gvim in Microsoft Windows WSL |
|
|
203 | (8) |
|
|
204 | (1) |
|
Installing an X Server for Windows |
|
|
205 | (1) |
|
Configuring the X Server for Windows |
|
|
205 | (6) |
|
GUI Options and Command Synopsis |
|
|
211 | (2) |
|
10 Multiple Windows in Vim |
|
|
213 | (24) |
|
Initiating Multiwindow Editing |
|
|
215 | (3) |
|
Multiwindow Initiation from the Command Line |
|
|
215 | (2) |
|
Multiwindow Editing Inside Vim |
|
|
217 | (1) |
|
|
218 | (3) |
|
|
218 | (1) |
|
|
218 | (2) |
|
Conditional Split Commands |
|
|
220 | (1) |
|
|
220 | (1) |
|
Moving Around Windows (Getting Your Cursor from Here to There) |
|
|
221 | (1) |
|
|
222 | (2) |
|
Moving Windows (Rotate or Exchange) |
|
|
222 | (1) |
|
Moving Windows and Changing Their Layout |
|
|
223 | (1) |
|
Window Move Commands: Synopsis |
|
|
224 | (1) |
|
|
224 | (4) |
|
|
225 | (1) |
|
|
226 | (1) |
|
Resizing Command Synopsis |
|
|
227 | (1) |
|
Buffers and Their Interaction with Windows |
|
|
228 | (3) |
|
|
229 | (1) |
|
|
229 | (1) |
|
|
230 | (1) |
|
|
231 | (1) |
|
|
231 | (2) |
|
|
233 | (1) |
|
Closing and Quitting Windows |
|
|
234 | (2) |
|
|
236 | (1) |
|
11 Vim Enhancements for Programmers |
|
|
237 | (52) |
|
Folding and Outlining (Outline Mode) |
|
|
238 | (12) |
|
|
240 | (2) |
|
|
242 | (5) |
|
|
247 | (2) |
|
A Few Words About the Other Fold Methods |
|
|
249 | (1) |
|
|
250 | (10) |
|
Vim autoindent Extensions to vi's autoindent |
|
|
251 | (1) |
|
|
251 | (1) |
|
|
252 | (6) |
|
|
258 | (1) |
|
A Final Word on Indentation |
|
|
259 | (1) |
|
Keyword and Dictionary Word Completion |
|
|
260 | (9) |
|
Insertion Completion Commands |
|
|
261 | (7) |
|
Some Final Comments on Vim Autocompletion |
|
|
268 | (1) |
|
|
269 | (2) |
|
|
271 | (10) |
|
|
271 | (1) |
|
|
272 | (6) |
|
|
278 | (3) |
|
Compiling and Checking Errors with Vim |
|
|
281 | (6) |
|
More Uses for the Quickfix List Window |
|
|
285 | (2) |
|
Some Final Thoughts on Vim for Writing Programs |
|
|
287 | (2) |
|
|
289 | (26) |
|
What's Your Favorite Color (Scheme)? |
|
|
289 | (11) |
|
|
290 | (2) |
|
|
292 | (1) |
|
|
293 | (2) |
|
|
295 | (1) |
|
A Nice Vim Piggybacking Trick |
|
|
296 | (1) |
|
Tuning a Vim Script with Global Variables |
|
|
297 | (2) |
|
|
299 | (1) |
|
Dynamic File Type Configuration Through Scripting |
|
|
300 | (8) |
|
|
300 | (2) |
|
|
302 | (1) |
|
|
303 | (1) |
|
|
304 | (2) |
|
|
306 | (1) |
|
|
306 | (2) |
|
Some Additional Thoughts About Vim Scripting |
|
|
308 | (5) |
|
A Useful Vim Script Example |
|
|
309 | (1) |
|
|
310 | (1) |
|
|
311 | (1) |
|
|
311 | (1) |
|
A Few More Comments About autocmd |
|
|
311 | (1) |
|
|
311 | (2) |
|
|
313 | (2) |
|
13 Other Cool Stuff in Vim |
|
|
315 | (24) |
|
|
315 | (3) |
|
For a Different Take on Words, Try Thesaurus |
|
|
318 | (1) |
|
|
318 | (2) |
|
Digraphs: Non-ASCII Characters |
|
|
320 | (2) |
|
Editing Files in Other Places |
|
|
322 | (2) |
|
Navigating and Changing Directories |
|
|
324 | (2) |
|
|
326 | (1) |
|
|
327 | (1) |
|
|
328 | (2) |
|
viminfo: Now, Where Was I? |
|
|
330 | (4) |
|
|
331 | (1) |
|
|
332 | (2) |
|
|
334 | (2) |
|
Abbreviations of Vim Commands and Options |
|
|
336 | (1) |
|
A Few Quickies (Not Necessarily Vim-Specific) |
|
|
337 | (1) |
|
|
338 | (1) |
|
14 Some Vim Power Techniques |
|
|
339 | (18) |
|
|
339 | (4) |
|
|
339 | (1) |
|
|
340 | (1) |
|
|
340 | (3) |
|
Moving into the Fast Lane |
|
|
343 | (7) |
|
Finding a Hard-to-Remember Command |
|
|
343 | (2) |
|
Analyzing a Famous Speech |
|
|
345 | (3) |
|
|
348 | (2) |
|
|
350 | (2) |
|
Enhancing the Status Line |
|
|
352 | (1) |
|
|
353 | (4) |
Part III Vim in the Larger Milieu |
|
|
15 Vim as IDE: Some Assembly Required |
|
|
357 | (18) |
|
|
357 | (2) |
|
Finding Just the Right Plug-In |
|
|
359 | (1) |
|
|
360 | (1) |
|
|
361 | (9) |
|
EditorConfig: Consistent Text Editing Setup |
|
|
361 | (1) |
|
NERDTree: File Tree Traversal Within Vim |
|
|
362 | (1) |
|
nerdtree-git-plug-in: NERDTree with Git Status Indicators |
|
|
362 | (1) |
|
Fugitive: Running Git from Within Vim |
|
|
363 | (2) |
|
|
365 | (4) |
|
Termdebug: Use GDB Directly Within Vim |
|
|
369 | (1) |
|
|
370 | (2) |
|
Coding Is Great, but What If I'm a Writer? |
|
|
372 | (1) |
|
|
373 | (2) |
|
|
375 | (36) |
|
|
375 | (1) |
|
Improving the Command-Line Experience |
|
|
375 | (1) |
|
|
376 | (1) |
|
|
377 | (4) |
|
|
377 | (3) |
|
|
380 | (1) |
|
|
380 | (1) |
|
|
381 | (3) |
|
|
382 | (1) |
|
Keep As Much History As You Can |
|
|
382 | (1) |
|
Command-Line Editing: Some Closing Thoughts |
|
|
383 | (1) |
|
|
384 | (1) |
|
|
384 | (7) |
|
|
384 | (1) |
|
|
385 | (1) |
|
|
386 | (1) |
|
Vim for Visual Studio Code |
|
|
387 | (4) |
|
|
391 | (6) |
|
|
391 | (2) |
|
|
393 | (4) |
|
|
397 | (8) |
|
|
398 | (1) |
|
|
399 | (6) |
|
vi for MS Word and Outlook |
|
|
405 | (3) |
|
Honorable Mention: Tools with Some vi Features |
|
|
408 | (1) |
|
|
408 | (1) |
|
|
408 | (1) |
|
|
409 | (2) |
|
|
411 | (4) |
Part IV. Appendixes |
|
|
A The vi, ex, and Vim Editors |
|
|
415 | (46) |
|
|
461 | (10) |
|
|
471 | (12) |
|
D vi and Vim: Source Code and Building |
|
|
483 | (8) |
Index |
|
491 | |