Satyagopal Mandal
All You need to Know about the Editor -"vi"
Differential Equations : Math 320

The operating system that we are using is called UNIX. This is a very popular operating system among the mathematics (or academic) community. Among the other operating systems you have hard of is WINDOW-95.

We will write a matlab program to "solve" differential equations. To write a program, while using unix, we have to use an editor to create a file to write the program. I use the editor called vi.

Basic Commands and "things" about vi:

  1. Type vi satya.m to open/start a file called "satya.m". Some (or most) of the files, in this course (math 320) will have to be called "something.m".
  2. Now you are in vi. You are in "command" mode. To go to input mode just press i . Now you can type in any thing you want. To come back to command mode press the "esc". You need to save what ever you typed in. To save, press "shift :w" and return.
    Now you can switch back and forth between input and command mode. You also need to know some more commands in the command mode.
  3. To go to the next line (while in command mode) press J, to the previous line press K, to the left press L, to right press H.
  4. To delete a later press x. To delete a line press DD. To undo the previous command press u.
  5. Save your file as often as you can. To quit (i.e. close) press ":q" and return and to save and quit press ":wq" and return, to quit without save press "q!" and return.
  6. This list is far from being complete.