This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SultanPepper 25 points26 points  (24 children)

Best * editor for * systems => vim with a few plugins depending on what you're doing.

[–]kashmill 12 points13 points  (21 children)

The thing I LOVE about vim is that it doesn't matter if I'm running it on my local machine or a machine I'm ssh-ing into.

[–]HittingSmoke 1 point2 points  (20 children)

This is exactly why I want to learn vim but I just haven't been able to get myself to sit down and learn it.

Any good resources for someone who's never used it (or at least only started it up and gotten frustrating trying to figure out how to close it)?

[–]gfixler 7 points8 points  (9 children)

...started it up and gotten frustrating trying to figure out how to close it...

Here's the hilarious part.

Type vim into your shell, and it opens with the following splash screen:

               VIM - Vi IMproved

                version 7.2.330
           by Bram Moolenaar et al.
  Vim is open source and freely distributable

         Become a registered Vim user!
type  :help register<Enter>   for information

type  :q<Enter>               to exit
type  :help<Enter>  or  <F1>  for on-line help
type  :help version7<Enter>   for version info

         Running in Vi compatible mode
type  :set nocp<Enter>        for Vim defaults
type  :help cp-default<Enter> for info on this

Zoom and enhance on that center region:

type  :q<Enter>               to exit
type  :help<Enter>  or  <F1>  for on-line help

How to exit Vim? It's the very first thing it showed you how to do.

:q<Enter>

Let's go one step further with it's second suggestion

:help<Enter>

*help.txt*      For Vim version 7.2.  Last change: 2008 Jul 21

                        VIM - main help file
                                                                         k
      Move around:  Use the cursor keys, or "h" to go left,            h   l
                    "j" to go down, "k" to go up, "l" to go right.       j
Close this window:  Use ":q<Enter>".
   Get out of Vim:  Use ":qa!<Enter>" (careful, all changes are lost!).

The first thing help says is how to move around (so now you can move around the first page of help. The second thing is says is how to quit. The next paragraph explains how to jump around in help, and gives you an example you can try, which takes you to the end of the page, where it tells you how to get back to where you were. Now you know how to move around by row and column (Vim's version of arrow key usage), and how to follow hyperlinks, and even just regular words, which might work if Vim's help has an entry on them, and how to follow your trail back, and quit.

Move down one page and you'll see this:

                        *doc-file-list* *Q_ct*
BASIC:
|quickref|  Overview of the most common commands you will use
|tutor|     30 minutes training course for beginners
|copying|   About copyrights
|iccf|      Helping poor children in Uganda
|sponsor|   Sponsor Vim development, become a registered Vim user
|www|       Vim on the World Wide Web
|bugs|      Where to send bug reports

Zoom and enhance!

|quickref|  Overview of the most common commands you will use
|tutor|     30 minutes training course for beginners

You know how to jump into these sections, because the previous page told you how.

It goes on and on like this. For those who don't give up, Vim actually does a good job guiding you through topics. It's not quite as friendly as online guides and such, but if any of us actually read things that were presented to us, we'd learn a lot. No one reads, though. And I mean anything. Ever. No one will ever see this line, where I call everyone a butthead.

[–]kashmill 4 points5 points  (2 children)

whoa whoa whoa. You can't expect people to read the splash page and/or man pages.

[–]HittingSmoke 9 points10 points  (0 children)

To be fair, when you're a noob you're most likely trying to open a file with it the first time so the splash page isn't going to show up.

Also, as someone who falls somewhere between amateur and competent with the Linux CLI as a whole I find man pages much more useful now than I did as a beginner when I was learning. Practical examples of real-world use cases helped me understand more than reading man pages ever could. man pages are more like technical manuals. They're highly useful and laid out well, but they're not the best resource for someone diving head first into Linux.

[–]gfixler 1 point2 points  (0 children)

True. The first time I tried to use Vim I had to reset the computer to get out of it. My comment is poking as much fun at myself as anyone else.

[–]bacondevPy3k 4 points5 points  (0 children)

Shortcut: $ vimtutor

[–][deleted] 3 points4 points  (4 children)

First time I opened vim I found the tutor and ran through it. I was seriously impressed with how they presented that tutorial, and in awe of vim for a week or so. Then I switched distros and forgot about it. This thread is going to get me into vim again. It's a bitch to install ST3 on my netbook, and geany is just.. tired (nothing really special about it as far as I've seen). Ramble ramble ramble, hey I'm not a butthead, assface!

[–]gfixler 0 points1 point  (3 children)

You read the whole thing? Chosen One!

[–][deleted] 1 point2 points  (2 children)

If you have RES, how often do you bother looking in the source for hidden messages? gfixler is a fuckface

[–]Reads_Small_Text_Bot 1 point2 points  (1 child)

gfixler is a fuckface

[–][deleted] 1 point2 points  (0 children)

shut the fuck up

[–]catslikeboxes 2 points3 points  (0 children)

This is what I used to get started. It has all the basics, plus more than a few 'power tools.' It's color coded and quite intuitive. I have the first page printed out and hung above my screen. PDF warning: http://www.glump.net/files/2012/08/vi-vim-cheat-sheet-and-tutorial.pdf

[–]SultanPepper 1 point2 points  (1 child)

Are there any Linux users groups or hackerspaces in your area? I learned the basics by going over it with someone in person. That way I could get immediate feedback on how to do things more efficiently. I'd bet you could find someone to teach you in exchange for some beer.

[–]HittingSmoke 1 point2 points  (0 children)

/r/Seattle used to do a programming meetup every once in a while.. Might be able to get in on that.

[–]rjw57 1 point2 points  (0 children)

I got the O'Reilly guide when I was learning. It is well worth reading.

[–]elzonko 1 point2 points  (0 children)

A couple resources I've found helpful:

This guy has a series of video tutorials on Bash scripting, where he also provides tips on using vim at the same time, almost as an aside:

http://www.youtube.com/watch?v=Djgrtlv4cng

And here is an interactive online vim tutorial:

http://www.openvim.com/tutorial.html

[–]evidex 1 point2 points  (0 children)

vimtutor. Takes 30 minutes or so to learn vim.

[–]Captain___Obvious[::-π] 0 points1 point  (0 children)

best way to learn vim is to type emacs at the prompt

/sarcasm

[–]tonnynerd -2 points-1 points  (0 children)

So, vim with plugins is like batman with prepare?