Keep It Simple, Stupid PerlMonks

### Re: Learn vi/vim in 50 lines and 15 minutes

by Abigail-II (Bishop)
 on Mar 04, 2004 at 14:48 UTC ( #333878=note: print w/replies, xml ) Need Help??

in reply to Learn vi/vim in 50 lines and 15 minutes

To edit a file with vi do:
vi file.txt
[download]
This is a bit misleading. On many systems, if you do vi file.txt, you do indeed edit the file with vi, and not with vim. You discuss vim, and while vim has many similarities with vi, not everything you discuss will work in vi. For instance, not on every system will the arrow keys work as expected in vi. There's no syntax highlighting in vi, nor does vi have any perl hooks.
It has 4 MODES.
That's just an opinion. One could also argue that vi only has command mode. But some commands take arbitrary long arguments. ;-).

Abigail (using vi since 1984)

Replies are listed 'Best First'.
Re: Re: Learn vi/vim in 50 lines and 15 minutes
by etcshadow (Priest) on Mar 05, 2004 at 04:27 UTC
alias vi=vim

Never leave home without it.

------------
:Wq
Not an editor command: Wq
[download]
Re^2: Learn vi/vim in 50 lines and 15 minutes
by brig (Scribe) on Dec 01, 2006 at 08:00 UTC

Yep, this is where I jump right in and say that I was taught and believe that vi has 2 modes, command and insert. In command mode you have an ed sub mode (:). In command mode you can use the / or ? command to search. The only reason I would use /usr/bin/vi would be an emergency.

On the positive side I wish there had been a web tutorial like this when I was cursing and crying in front of the beeping flashing monster with the intimidating tilde teeth. (they really do look like teeth on a HP-Term in a panic trying to figure out how to use it to do homework.) That was when I learned about O'Reilly.

Love, --Brig Update: Fixed 2 typos

Create A New User
Node Status?
node history
Node Type: note [id://333878]
help
Chatterbox?
 [Corion]: thezip: If you want to open vim and can live with opening a second console window, use start "The results" vim.exe c:\path\to\logfile .log [thezip]: Ooops... I lied. I guess Cygwin is back. I'll just do a tail -f instead. Better. Sorry for the noise. [Corion]: Once more, I'm looking for a sane client-side framework, but I guess these don't exist. Everything I look at either uses a weirdo home-grown templating language (like Angular in all its incarnations) or uses weirdo Javascript incarnations (like ... [Corion]: ... Inferno.js, which uses ES2015) or uses some horrible amount of Javascript infrastructure before you can even render a single file. [Corion]: I'd really like to create a dynamic frontend for my Google Keep clone, but so far, all the templating solutions seem to bring their own template language or require me to hand-code everything in (their own flavour of) Javascript. I'd like something ...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (13)
As of 2017-03-27 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Should Pluto Get Its Planethood Back?

Results (321 votes). Check out past polls.