Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Website Design/Showcase (http://www.chiefdelphi.com/forums/forumdisplay.php?f=64)
-   -   vi editor (http://www.chiefdelphi.com/forums/showthread.php?t=15565)

Jack 21-12-2002 14:31

vi editor
 
Ok.. Another question.

What's a vi editor?

I thought that it's a text editor. Right?? If it is, then why just not use notepad?

Thanks

Brandon Martus 21-12-2002 14:42

vi is an editor that comes standard on a lot (most) unix/linux distributions. When I edit code, I am doing so directly on the web server, so I don't have notepad available to me. I find that I can program faster with vi than any other editor (pico, emacs, etc).

It's a pain to learn.. but once you do you'll never go back. :)

rbayer 21-12-2002 15:52

Yeah, I'm just starting to get the basics down, and it definately does speed stuff up. It's the only editor available on some of the machines I work with, so I was kinda forced into learning it.

The best way I can describe it is that it's a text editor without ANY user interface--not even menus. It works really well over telnet/SSH because of this and doesn't require any fancy graphics packages installed like X, etc.

Mongoose 21-12-2002 16:44

Notepad is Windows only, so you don't get it with any other OSes like Linux, Unix, or MacOS. The thing with vi is that it's console based, but it's waaaaay faster. *BUT* once you get the commands down. Like the others say, t's a pain to learn. For example, when you start it, you don't just start plugging in text right away; you have to change modes first. And some commands are cryptic or not immediately intuitive.

I think it's pronounced vee-eye, and vi stands for VIsual, and it's an improvement over ed, which is an older editor?

If you're really interested, you can sign up for a shell account by telnetting to sdf.lonestar.org and typing "vilearn".

Jeremy_Mc 23-12-2002 10:24

Don't let that scare you away from editing text with Linux on a server...

There are many more easier to use editors like pico/nano, ee, and a slew of others.

Also, if vi's simplicity doesn't suit your fancy you can try emacs which has an unbelievable amount of features built into it, but some people think it's bloated.

If you need anymore help or have any questions, pm or e-mail me.

Later

Mike Betts 23-12-2002 11:17

Jack,

Written in 1976 by Bill Joy at Berkley for BSD, the vi editor was incorporated into System V of UNIX and has been around ever since.

For more information on the history please see:

http://www.cs.pdx.edu/~kirkenda/joy84.html

vi (pronounced "vee eye" and never capitalized) has a plain keyboard interface for every function. As an example: h, j, k and l move the cursor because Teletype interfaces to the old PDP-11, et cetera had no arrow keys.

If you are a Windows person and will infrequently program on UNIX, Linux, et cetera, vi is a bit of a pain to learn and you should not bother. It really takes a few days to get the hang of it.

However, if you want to be a geek (and be proud of it), vi is one of those tools that you will have to master if you want to be taken seriously as a programmer... IMHO.

For a good tutorial from the guy who wrote it, see:

http://docs.freebsd.org/44doc/usd/12....html#section6

Good luck.

Mike Soukup 23-12-2002 16:15

Take the time to learn vi, you won't regret it. After learning the commands and becoming familiar with them you'll be able to edit code a lot faster than with a simple editor like notepad or pico. A few quick keystrokes gives you access to simple commands (moving through text, yank & paste, delete) and very powerful commands (repeat, macros, search & replace). The fact that all the commands are on the keyboard instead of menus is what makes it so quick (and of course confusing & difficult to learn), you never have to remove your hands from 'home position.'

I actually never use vi, I've switched to vim, which stands for "vi improved." It comes with most Linux distributions and you can get it for almost any OS at http://www.vim.org It adds GUI support, multiple undo / redo, syntax highlighting, multiple buffers, split screen, visual mode, and a whole lot more. Go download it and try it out.

Mike

Brandon Martus 23-12-2002 19:22

Quote:

Originally posted by Mike Soukup
I actually never use vi, I've switched to vim, which stands for "vi improved." It comes with most Linux distributions and you can get it for almost any OS at http://www.vim.org It adds GUI support, multiple undo / redo, syntax highlighting, multiple buffers, split screen, visual mode, and a whole lot more. Go download it and try it out.

Mike

OH! I forgot, now that we have our own server.. I can install vim on the server. Hooray! :) Thanks for the reminder.

ckim 30-12-2002 16:52

vi is great
 
I believe vi is great. Although emacs provides far more features and many use it religiously. I use vi because it's available in linux and freebsd and other *nix systems I work with. Also vi uses far less system resources. Once you master all the keystrokes it will be a fast easy way to edit files. If you prefer nice color syntaxing for coding I suggest vim. It provide color syntaxing for most of major languages. (c, c++, php, perl, python etc.). To enable it type :syntax on. you can add that to your .vimrc .

Brandon Martus 30-12-2002 16:57

I use(d) 'syntax on' at work for a while, but with our version of vim, it seemed to mess up when you would page through many pages of code. You'd have to go all the way up to the top of the file for it to reset its syntax highlighting. Other than that little fluke, I liked it.

I also like 'set showmatch' which will make the cursor temporarily jump to the opeining parenthesis/brace/bracket/etc you are currently closing.

FotoPlasma 30-12-2002 17:08

Wow. I really have to admit, when this thread was started, I thought it'd just turn into another flamewar between vi[m] lovers and emacs lovers. Much to my joy, it hasn't.

I don't know all the intricacies of vi yet, but for practically all of the text editing I do in Linux, I use it.

josh_johnson 30-12-2002 22:50

I tried using vi at one point, but I normally use a dvorak keyboard layout, so the location of many of the keys (e.g. j,k,l,m) make vi even harder and slower for me to use. Because of this, i use emacs whenever I need to do any *nix programming.

ckim 30-12-2002 22:55

Heh. I've never tried a dvorak keyboard. I have a qwerty keyboard which I normally use at school. But at home I have a sun type 5 keyboard and a keyboard with a similar layout for my pcs which I find easier to use with vi.

josh_johnson 30-12-2002 23:57

Dvorak is a completely different layout from the qwerty style. The keys are arranged so typing is quicker. I can type a little faster with it than I can with a qwerty and I am still trying to learn to type faster with it.
Dvorak Keyboard Layout

Matt Leese 31-12-2002 08:42

Quote:

Originally posted by josh_johnson
Dvorak is a completely different layout from the qwerty style. The keys are arranged so typing is quicker. I can type a little faster with it than I can with a qwerty and I am still trying to learn to type faster with it.
Dvorak Keyboard Layout

Whether Dvorak is actually a faster keyboard layout is rather controversial. I've never seen any good evidence that it is (too much of it is anecdotal). It is supposed to be better on your wrists but I think an ergonomic keyboard is a better solution there.

Matt


All times are GMT -5. The time now is 02:08.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi