Learn to edit text with a fast local editor at the Linux command line.
Linux vim command summary with examples (3:38)
Videos can also be accessed from the YouTube Playlist.
Our fifty-seventh word, or command to memorize is
vim from our category
vim allows you to edit text files.
Recall from video 20 on
video 56 on
emacs, I'm introducing
three text editors, so you know what's out there, but not to dive into
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
vim command has
over 50 options and the argument is a text file you'd
like to edit, and because
vim is a
highly-customizable text-editing program, its list of internal
keystrokes is beyond our scope here.
Like most commands, help is available with double-dash
--help. Once inside vim, see internal
help by hitting the escape key
:, then typing
To leave, hit escape
Esc, then colon
So why is
vim an important command?
Well coders spend a lot of time editing text, often without taking
hands off the keyboard, so evaluate if
vim is for you.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go. Let's start with the
vim --help option, and redirect it
> to a file called
video57.txt, similar to what we did in
video (tutorial) 56.
vim and that filename
Here it is, you can use arrows, and
PgDn to scroll. Here we only have time
for this quick look, unfortunately.
So, to quit, type that combination
And last, let's head back in without a file
And here the
Enter. Here's some information, so
please review this later.
And then let's leave. Here we go
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
command. So showing you
here was meant to kick off your journey and should you work best in
a GUI, both programs are available there too.
Okay, thanks for visiting today. I hope this was a helpful
introduction to the
vim (editor) command.
To be totally fair, this tutorial is the simpleist of introductions. My preferred editor is now vim and I'm working on a tutorial dedicated to it. Sign up for reminders so you're informed when it comes out. Thanks, -Paul
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
Subscribe to our YouTube Channel here to be notified of new content.
emacscommand, hit Back.
historycommand. Click Next.