[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
slackbook:vi [2012/09/02 05:31 (UTC)] – [What is vi?] allend | slackbook:vi [2012/09/12 21:48 (UTC)] – [What is vi?] Updated with original text and formatting mfillpot | ||
---|---|---|---|
Line 4: | Line 4: | ||
- | Scattered all around your computer are thousands of text files. To a new user, this may seem inconsequential, | + | Scattered all around your computer are thousands of text files. To a |
+ | new user, this may seem inconsequential, | ||
+ | Slackware Linux uses a plain-text file for configuration. This allows | ||
+ | users to make changes to the system quickly, easily, and intuitively. | ||
+ | In chapter | ||
+ | **//cat//** and **//less//** that | ||
+ | can be used to read these files, but what if we want to make changes to | ||
+ | them? For that, we need a text editor, and | ||
+ | **//vi//** is up to the task. | ||
- | In short, vi is one of the oldest and most powerful text editors still used today. It's beloved by system administrators, | ||
- | A little further explanation is needed to learn exactly what vi is today though, as Slackware Linux technically doesn't include vi. Rather, Slackware includes two vi " | + | In short, **//vi//** is one of the oldest and most |
+ | powerful text editors still used today. It's beloved by system | ||
+ | administrators, programmers, hobbiests, and others the world over. In | ||
+ | fact, nearly | ||
+ | **//vi//**; only the next chapter on | ||
+ | **//emacs//** was written with that editor. | ||
- | vi is very powerful, but also somewhat cumbersome and challenging for a new user to learn. However, mastering vi is an important skill for any self-respecting system administrator to learn, as vi is included on nearly every Linux distribution, | ||
+ | A little further explanation is needed to learn exactly what | ||
+ | **//vi//** is today though, as Slackware Linux | ||
+ | technically doesn' | ||
+ | Slackware includes two vi //" | ||
+ | and **// | ||
+ | features to vi such as syntax highlighting, | ||
+ | network support. We won't go too deeply into all these details. By | ||
+ | default, if you execute **//vi//** on Slackware | ||
+ | Linux, you'll be using **// | ||
+ | examples in this chapter will assume that is what you are using. If | ||
+ | you've used another Linux distribution before, you may be more familiar | ||
+ | with **// | ||
+ | the symlink for ''/ | ||
+ | ''/ | ||
+ | startup scripts. **//vim//** is generally considered | ||
+ | to be more feature-rich than **// | ||
+ | **// | ||
+ | more features than most users will ever need. | ||
+ | |||
+ | |||
+ | **//vi//** is very powerful, but also somewhat | ||
+ | cumbersome and challening for a new user to learn. However, mastering | ||
+ | **//vi//** is an important skill for any | ||
+ | self-respecting system administrator to learn, as | ||
+ | **//vi//** is included on nearly every Linux | ||
+ | distribution, | ||
+ | It's even included in Mac OS X. | ||
+ | Once you've learned **//vi//**, you'll not have to | ||
+ | learn another text editor to work on any of these systems. In fact, | ||
+ | **//vi//** clones have even been ported to Microsoft Windows | ||
+ | systems, so you can use it there too. | ||
===== The Different Modes of vi ===== | ===== The Different Modes of vi ===== | ||
Line 29: | Line 71: | ||
| | ||
- | At this point, the user will being typing and expect the keys he presses | + | At this point, the user will begin typing and expect the keys pressed |
===== Opening, Saving, and Quitting ===== | ===== Opening, Saving, and Quitting ===== | ||
Line 80: | Line 122: | ||
|X|Delete the previous character| | |X|Delete the previous character| | ||
|u|Undo the last action| | |u|Undo the last action| | ||
- | |: | + | |: |
- | |: | + | |: |
- | |/ | + | |/ |
|:q|Quit (without saving)| | |:q|Quit (without saving)| | ||
|:w|Save the current document| | |:w|Save the current document| | ||
Line 88: | Line 130: | ||
|:x|Save and quit| | |:x|Save and quit| | ||
- | =====Sources===== | + | ====== Chapter Navigation ====== |
+ | |||
+ | **Previous Chapter: [[slackbook: | ||
+ | |||
+ | **Next Chapter: [[slackbook: | ||
+ | ======Sources====== | ||
- | * Original source: http:// | + | |