Author Topic: VI: what\'s the big deal?  (Read 9693 times)

raybert

  • Full Member
  • ***
  • Posts: 233
    • View Profile
VI: what\'s the big deal?
« Reply #30 on: June 16, 2004, 10:52:30 am »
Quote
copy the word \"The\"  with three keystrokes: y3l (yank three characters to the right)


I can do that in two: yw (yank word)

Quote
Brief was and is still one of the best text editors ever developed.


I must concur with this.  Brief was awesome!  The best thing about it is that it was totally programmable using a special compiled macro language.  Most of the basic editor functionality was implemented in the same macro language and you could change it all you wanted.  You could also implement major new features with ease.  The only problem with this, of course, is that you were lost on someone else\'s machine.  Oh well.

Quote
How do you set the delete key to work instead of sending ^? in vi on the SL5500?


It\'s probably easier to just use vi\'s delete key: x

~ray

bluey

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • http://
VI: what\'s the big deal?
« Reply #31 on: June 16, 2004, 11:53:30 am »
Quote
(...)it was the only game in town(...)


This is why I learned to use VI, because situations like that can happen, and then I got myself just using it for everyday file editing tasks.

Each one uses what fits best to ones needs, you can use an electric screwdriver, it is better, but sometimes there\'s only a normal screwdriver...
SL-5500 - OZ 3.5.3
256Mb Kingston SD Card
64Mb PQI CF Card
Netgear MA701 WiFi CF Card
Mandriva GNU/Linux LE2005
Dreaming of a C model...

datajerk

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • http://
VI: what\'s the big deal?
« Reply #32 on: June 16, 2004, 11:58:52 am »
Another reason to learn vi is that you can use it to edit shell commands.  I use this all the time:

bash/ksh:

set -o vi

Hit ESC

Now you are in vi mode, you and J/K through commands (sorry no arrows anymore), / to search for previous commands, you can insert, delete chars, jump by word or EOL.  Very nice.

To get it back to arrorws type:

set -o emacs

You can use the arrows again and emacs commands as well.

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
VI: what\'s the big deal?
« Reply #33 on: June 16, 2004, 12:06:08 pm »
agreed.  VI is the basic editor for unix/linux.  Once you are competent with it, you will no longer have to worry about what system you are on or whether it has nano or pico on it.  You just go in and edit.  When a unix system is down to init 1, it won\'t  matter what unix machine you\'re on.

Quote
You\'ll find vi (or a variant of it) on just about every *nix box in the world.  Basic competence can be a real help when you end up on one of them.  Keeps you from having to just stare dumbly at a shell prompt.
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)

bredroll

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • http://www.darkspace.org.uk
VI: what\'s the big deal?
« Reply #34 on: June 24, 2004, 05:01:36 pm »
i would say folks, (speaking from non-pda vi use) if you know how to use it, then vi can be the best editor ever.

it has scripting and excellent syntax highlighting.

the reason it is on every unix system is because it is so so small, compared to emacs vi is absolutely tiny,

if you are a unix user, even if u prefer emacs, its always good to know vi well as sometimes you will have such a broken system to fix that the only thing that will still work is vi.

vim is alot easier than vi, (vim can emulate vi awell)

vim is simply vi with some more clever stuff that you will never see (often) built in.

seriously, (on a non-pda) once you get the hang of the commands, its great.

[insert] - switches you between insert and replace mode
[esc] - puts you in command mode
[esc] v - puts you in visual mode (for copy and paste etc)
[shift]aa - move between windows

- command mode -
:q     # quit
:q!    # quit without save
:w    # save
:wq  # save and quit
:u    #  undo
:split file.txt   # open another file in a vertical split window
:read file.txt   # read in file.txt at the current location

:-)
SL5500 OZ3.3.5 -
Origio CF Wifi Card, Kingston 256mb + 128mb CF Cards
Sandisk 128mb SD

lucho

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
    • http://
VI: what\'s the big deal?
« Reply #35 on: June 24, 2004, 05:30:27 pm »
Sometimes the system is so broken that even vi doesn't work. That's why in addition to vi , I also know ed -- it always works. And, of course, it is much more obfuscated than vi
« Last Edit: June 24, 2004, 05:35:35 pm by lucho »