Re: [Hampshire] How to get your foot in the door?

Top Page

Reply to this message
Author: Gordon Scott
Date:  
To: hampshire
Subject: Re: [Hampshire] How to get your foot in the door?
On Tue, 2013-08-20 at 23:33 +0100, Michael Daffin wrote:

>
> They should all come with an up to date version of vi (or rather, vim
> in compatibility mode, which makes it behave like the old vi
> versions), but they tend to only come with the minimal version with
> compatibility mode only. It is worth trying it out for the times where
> you have no alternative or way to get an alternative so you can at
> least muddle through.


IMHO it's worth learning the traditional vi stuff anyway, because that's
from where lots of the power comes. There are only a few differences
from vi to the same functions in vim. Mostly vim is a superset.

FWIW, I think it's easier to learn the original vi first, adding the vim
extensions when you want them, as vim's add-ons make it significantly
more complex.

vi/vim is substantially 'object oriented' in that it understands
syntax-related 'objects' within the file like letters, words, code
blocks, functions, sentences, parapgraphs. Most commands and objects
also have reasonable mnemonics, so are fairly easy to remember. As an
example d means delete w is a word and dw means delete the words from
the cursor. 6dw or d6w both mean delete six words. Just a w means
forwards a word, 6w means ... well, obvious.

Vim works fine as an ordinary interactive editor when in its insert
mode, though then most of its power is unused. vi will also work that
way if the right macros are set up, as increasingly they are.

They have a superb command liee mode (c.f. 'ed') that allows whole-file
match-and-edit changes with sub-string manipulations.

Regular expressions for pattern matching.

Syntax highlighting for what seems like nearly everything, and you can
always add your own if it isn't everything.

Like the popular languages, it's available for most platforms.

The built-in help is accurate, but hard to use (IMHO, but I doubt many
would disagree). There are html/pdf copies on the vim website and a vim
book, both of which are easier.

(Disclaimer: Other editors are available, many are excellent and suit
many people, I use a number myself, I used emacs for several years, no
editor wars please.)

I like the cartoon on the vim 'about' page:
http://www.vim.org/about.php

Gordon.




--
Please post to: Hampshire@???
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------