News for hackers. Stuff that matters.
Re:Everyone's first Vi session by mhartl on Thursday January 17, 2008 @01:50PM (#99890)
One of my college friends suprised me by "saving" a paper she was working on in vi by typing ':wq' and then typing 'vi <paper>' at the command line. Turns out she thought that ':wq' was how you saved in vi, and was happy when I told her to try typing just ':w' instead.
Re:Everyone's first Vi session by eru on Thursday January 17, 2008 @04:18PM (#99969)
[...] and was happy when I told ter to try typing just ':x' instead.
Re:Everyone's first Vi session by tokipin on Thursday January 17, 2008 @10:40PM (#100139)
i can't imagine not programming in Vim. it's so natural. using a normal text editor (including professional IDE's) feels like trudging through quagmire by comparison

a mistake learners of Vi make is being in insert mode most of the time. you should be in command mode almost always. like 94% of the time. otherwise it's no different than a normal text editor with hotkeys. also, newbies need to make use the repeat command '.' which repeats the whole last text _change_. it's not just a paste

once you get some good experience and try to stay out of insert mode, your cursor starts flying around performing all sorts of uber hacker slice & dice magic

Re:Everyone's first Vi session by jamongkad on Friday January 18, 2008 @09:41AM (#100318)
Hell yeah! I'm just recently learning Vim and I wondered what was I thinking back then when I was using normal text editors. I especially love the :sp command as it allows me to open multiple windows of my code within the same screen. And oh yes the '.' command is the best. I'm still currently getting the hang of it though.
Re:Everyone's first Vi session by abstractbill on Friday January 18, 2008 @12:10AM (#100171)
I feel the same way about emacs. A few nights back I was editing my wife's website - making quite a lot of use of keyboard macros, regex search-and-replace, and that kind of thing. She's only ever used MS-Word so she was continuously asking me "how do you do that?"
Re:Everyone's first Vi session by tx on Friday January 18, 2008 @02:23PM (#100454)
After years of Visual Studio I forced myself to learn vim and it wasn't so hard. By "learned" I mean crossing a line where my productivity is on par or better than Visual Studio used to be.

Emacs, however, is nowhere as easy. I am trying to repeat my vim experience by forcing myself to use emacs (part of my CL adventure) and I feel like I need a third hand to hold Ctrl or Alt all the time... Even vim-style navigation without arrows calls for constantly pressed Ctrl.

Not trying to start a war, just sharing my experience. After all it was other peoples "vim tales" that inspired me in the first place.

Re:Everyone's first Vi session by yters on Friday January 18, 2008 @04:14AM (#100241)
I wish the emacs macro system was easily Turing complete, but that must open a can of worms or something. I like the notion of writing a program as I do an action, but the macros don't really have control structures built in.
Re:Everyone's first Vi session by davidw on Thursday January 17, 2008 @01:22PM (#99877)
Sort of like the ed session here:

http://www.gnu.org/fun/jokes/ed.msg.html

"Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity."

Re:Everyone's first Vi session by far33d on Thursday January 17, 2008 @01:25PM (#99878)
For a while I thought the only way to quit vi was to cntl-z and then kill.
Re:Everyone's first Vi session by eru on Thursday January 17, 2008 @04:19PM (#99971)
That's what I thought of (command-line) emacs first.
Re:Everyone's first Vi session by weel on Friday January 18, 2008 @07:21AM (#100276)
The first time I used vi was in a summer camp while I was in high school. I had accidentally entered "view foo.txt" into a command prompt on a Linux box, and "view" was symlinked to "vi."

We couldn't figure out how to fix this, so we asked the instructor, who replied to us in a heavy German accent: "aha, you see, vi ees an edeetor, and weez everyzing eet does eet say beeeep."

Actually, he was speaking Dutch with a German accent, not English, but you get the idea.

Re:Everyone's first Vi session by bayareaguy on Thursday January 17, 2008 @01:46PM (#99889)
It may have been that way once but these days if you use vim, by the time you get to the second ^C the message

Type :quit<Enter> to exit Vim

will appear.

Re:Everyone's first Vi session by kajecounterhack on Thursday January 17, 2008 @11:18PM (#100157)
@mhartl: I did the same thing until I went and read up on vi long ago...

Also when I finally learned that you could copy and paste into the terminal with ctrl+shift+v/c, I cried tears of joy. Back then, as a nub on linux and copying all those long commands from forum boards without copy/paste...yes. it really was the dark ages.

Re:Everyone's first Vi session by gscott on Thursday January 17, 2008 @02:08PM (#99898)
What is the difference between vi and Pico? I always found vi a mystery and just used pico instead.
Re:Everyone's first Vi session by jey on Thursday January 17, 2008 @03:26PM (#99940)
Vi is a text editor for serious text editing, it takes some getting used to but is chock full of powerful features. Pico is designed for people who occasionally log into a UNIX machine to check mail or something (its origins are in Pine, which is an email client for UNIX newbies). As a programmer you spend all day editing text, so it's definitely worth putting in the effort to learn how to use a good text editor.

After a decade of regular use I'm only an intermediate vim user, but what I know so far really helps with my productivity.

http://www.google.com/search?hl=en&q=vim%20tutorial

Re:Everyone's first Vi session by brk on Thursday January 17, 2008 @02:21PM (#99903)
I would say the same thing, except swap vi and pico in your comment :)

I think it's all a matter of what you got used to first. I started out by using vi on some HPUX machines around 13 or 14 years ago. I've just kinda stuck with it ever since because it's on almost every machine I come across, and I can function in vi fairly well.

Re:Everyone's first Vi session by damon on Thursday January 17, 2008 @01:51PM (#99891)
Imagine what the emacs version would look like. M-q C-q M-C-q M-x quit ...
Re:Everyone's first Vi session by abstractbill on Thursday January 17, 2008 @01:53PM (#99892)
Menu->File->Quit

I have the menu bar switched off though, so a new user trying my emacs wouldn't have a clue.