|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
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 Last edited by Jack : 21-12-2002 at 14:33. |
|
#2
|
|||||
|
|||||
|
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. ![]() |
|
#3
|
||||||
|
||||||
|
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. |
|
#4
|
||||
|
||||
|
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". Last edited by Mongoose : 21-12-2002 at 16:47. |
|
#5
|
|||||
|
|||||
|
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 |
|
#6
|
||||
|
||||
|
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. |
|
#7
|
||||
|
||||
|
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 |
|
#8
|
|||||
|
|||||
|
Quote:
Thanks for the reminder. |
|
#9
|
|||||
|
|||||
|
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 .
|
|
#10
|
|||||
|
|||||
|
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. |
|
#11
|
||||
|
||||
|
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. |
|
#12
|
|||
|
|||
|
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.
|
|
#13
|
|||||
|
|||||
|
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.
|
|
#14
|
|||
|
|||
|
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 |
|
#15
|
|||||
|
|||||
|
Quote:
Matt |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Impending BASIC Stamp Editor Beta 2 release | Greg Ross | Programming | 9 | 19-09-2003 06:05 |
| White Paper Discuss: FIRST Editor v1.2 Source | CD47-Bot | Extra Discussion | 1 | 18-09-2003 19:34 |
| White Paper Discuss: FIRST Editor v1.2 | CD47-Bot | Extra Discussion | 1 | 18-09-2003 19:32 |
| White Paper Discuss: FIRST Editor (v1.1) | CD47-Bot | Extra Discussion | 7 | 17-09-2003 19:07 |
| FIRST Editor v1.0 | Raven_Writer | Programming | 0 | 12-09-2003 16:23 |