Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-22-2008, 05:38 PM   #1
LQ Newbie
Registered: Jul 2008
Posts: 2

Rep: Reputation: 0
Where to start with learning Vi/Vim?

Probably not the best title ever, but this is more of a generic question. I've recently picked up Fedora 9 in order to try and learn more about Linux and how it works, and I've read through a beginners guide to linux which covers basic usage of the OS, I can move files around, copy, paste, make folders etc, what I'm stuck at now is what should I look at next. A few friends recommended learning Vi/Vim, although I have no idea where to start with this, from what I understand its a text editor, which to put into perspective, I'm a windows user so to me that would be something like notepad.

Anyway apparently Vim can be used to program things as well, but I have no idea what I'm doing, so my questions are this: Where is the best place to start learning Vim, are there any books that would be worth reading, and what would be a good project to set myself to do to get the most out of the Vim?

Thanks in advance!
Old 07-22-2008, 05:48 PM   #2
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Just click the Help menu to acquaint yourself with the basics. As for books, there is one in the O'Reilly series that goes in depth (can't remember the title, sorry).

Vim is nothing like notepad, by the way, it's so much more.

Last edited by jay73; 07-22-2008 at 05:49 PM.
Old 07-22-2008, 06:07 PM   #3
Mr. C.
Senior Member
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 62
Get the Vi IMproved - Vim book by Steve Oualline, published by New Riders; its terrific.
Old 07-22-2008, 06:25 PM   #4
Registered: Jul 2008
Distribution: FreeBSD, Slackware, Debian
Posts: 67

Rep: Reputation: 15
Try this
Old 07-22-2008, 06:35 PM   #5
LQ Newbie
Registered: Aug 2006
Posts: 3

Rep: Reputation: 0
Try vimtutor. It should be in the default fedora install. Also just search online for vi tutorials. That will be the quickest way to get up and running. Then look at the books mentioned in other posts for the more advanced editing/search functions and settings.

Old 07-22-2008, 08:39 PM   #6
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,417

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Also the home page has lots of help:
and its free
Old 07-22-2008, 09:08 PM   #7
Registered: Jan 2007
Location: High Castle
Distribution: FC8
Posts: 66

Rep: Reputation: 15
just type vimtutor in the terminal.
Old 07-23-2008, 04:30 AM   #8
Senior Member
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,064

Rep: Reputation: 894Reputation: 894Reputation: 894Reputation: 894Reputation: 894Reputation: 894Reputation: 894
Given your background, I'd have guessed that a gui-based editor like kate would have been easier for you to get started with, but learning vim (or joe) is a good thing to do anyway. Not everyone will like one of those, though.
Old 07-23-2008, 05:19 AM   #9
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
This will give you the basics, demo
Old 07-23-2008, 09:05 AM   #10
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,241
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
Graphical vi-vim Cheat Sheet and Tutorial
Old 07-23-2008, 12:47 PM   #11
Senior Member
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,093

Rep: Reputation: 197Reputation: 197
vi is a text editor. vim is vi iMproved and mostly on Linux machines these days you'll encounter vim rather than vi. If you just run 'vi' it'll tell you what variant it is. Vi(m) can be used to 'program things' in the same way that any other text editor can be - I.e. you can use it to create and edit text files and since programming is just writing code, which is text, then you can use it to write code, be that C++, perl, Javascript, HTML, whatever. But there's nothing special about that, the same is true for any text editor including Notepad.

If you are in the business of administering *nix machines over an ssh connection or working on machines where there is no GUI environment installed, then the ability to use vi is pretty much essential as the availability of some variant of vi on any given *nix is a near certainty and the same can't be said for other text editors. (emacs, maybe...) However if you're just mucking about at home then there is no actual reason to use vi. I've been using *nix type systems for 15 years and am quite happy using vi when I need to, but mostly I use Kate.

The thing that people tend to find the most confusing when they've never used vi before is that it's got two modes. One mode allows you to type text, the other issue commands.

The most important key sequence to learn for vi is Esc Esc : q ! which will quit without saving any changes to the file you were editing. Very handy if you've got in a total mess.
Old 07-25-2008, 05:11 PM   #12
LQ Newbie
Registered: Jul 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Cheers everybody, been slowly understanding more and more about Vi and VIM, I've chosen to go with learning the text based one over the gui as I cant always get my Gui to work, I'm still having configuration issues every so often.
I must admit the tutorial is quite helpful, and I can at least get my X terminal to restart when it all goes horribly wrong
Old 07-26-2008, 12:40 AM   #13
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,241
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
Just in case you didn't follow the link I provided thinking it was for the GUI version of vi/vim.. it is not. it is a graphical representation of the keyboard with the keys marked for what they do in vi.. it's really a very handy reference for the command line version.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where did U start learning linux? caleb star Slackware 55 10-21-2011 09:17 AM
Wanting to start learning linux mystex Linux - Newbie 9 05-16-2006 02:52 AM
Learning Linux: how do I start? karlkropotkin Linux - Newbie 2 03-15-2006 11:11 PM
how to start learning kdevelop?? gajaykrishnan Programming 2 07-31-2004 12:41 AM
Learning Python... where do i start?? Claus Programming 2 09-02-2003 07:42 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:17 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration