LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Where to start with learning Vi/Vim? (https://www.linuxquestions.org/questions/linux-newbie-8/where-to-start-with-learning-vi-vim-657524/)

metroid2k 07-22-2008 04:38 PM

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!

jay73 07-22-2008 04:48 PM

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.

Mr. C. 07-22-2008 05:07 PM

Get the Vi IMproved - Vim book by Steve Oualline, published by New Riders; its terrific.

gNguyen 07-22-2008 05:25 PM

Try this http://www.ph.unimelb.edu.au/~ssk/vim/howto.html

GeekBoi 07-22-2008 05:35 PM

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.


Charlie

chrism01 07-22-2008 07:39 PM

Also the home page has lots of help: http://www.vim.org/
and its free :)

nawuza 07-22-2008 08:08 PM

just type vimtutor in the terminal.:study:

salasi 07-23-2008 03:30 AM

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.

mrrangerman 07-23-2008 04:19 AM

This will give you the basics, demo

farslayer 07-23-2008 08:05 AM

Graphical vi-vim Cheat Sheet and Tutorial

arizonagroovejet 07-23-2008 11:47 AM

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.

metroid2k 07-25-2008 04:11 PM

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 :D

farslayer 07-25-2008 11:40 PM

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.


All times are GMT -5. The time now is 05:12 AM.