I hated vi at the beginning too but once you learn a good portion of the vi commands I promise you will never want to use pico again. Sure vi is comple (every upper and lower case characters iare a command, except q I believe). I loathe pico now that I know vi inside and out, and my productivity has increased significantly. examples. Cut and paste lines 25 - 100 to a file :25,100 w Search and replace all occurences of WARRIOR with FIGHTER :1,$ s/WARRIOR/FIGHTER/g Delete 1200 lines 1200 dd Read in another file at the cursor :r file Read in the UNIX date (useful for changelogs) :r !date Go to line 2048 (useful right after errors and greps) :2048 Search for the next occurence of /send_to_char /send_to_char Copy the next 10 lines and paste them at the cursor(usefull for adding levels =)) 10yy p If you plan on sticking around the unix OS for a while, I suggest learning vi! My 2 bits, Chuck -----Original Message----- From: Aaron Miller <archmage@CRYOGEN.COM> To: CIRCLE@POST.QUEENSU.CA <CIRCLE@POST.QUEENSU.CA> Date: Tuesday, December 16, 1997 1:14 PM Subject: Re: Development Style >>pico >Yeah! pico! Thee best editor. I can't stand vi or emacs, or anything in X for that matter. > >ObCircle: >I'm re-writing the chargen routine in interpreter.c. I'm having problems >parsing arguments, however. I need three arguments (I wrote a function for >that). arg only contains one, and argument is undeclared. Anyone? Also, this >is more of a general C question, but what would be an efficient way to do >this (psuedo code follows) > > if chars input is bla, set pointer1 to inp > if chars input is bla2, set pointer1 to inp2 > if chars input is bla3, set pointer1 to inp3 > > /* inp, inp2, and inp3 are all variables. after some type of if statement > * i want to be able to modify one thing in any case (pointer1) in such > * a way that its _VALUE_ is the variable being changed. so if pointer1 = inp > * i want to change inp. due to the number of possible switches in my real > * code, this is much easier then changing the said variable in each if > * statement > */ > > change the variable thats name is the same as the value of pointer1 > > end > >Ok, I hope that wasn't too messy. Any help would be appreciated. > > > +------------------------------------------------------------+ > | Ensure that you have read the CircleMUD Mailing List FAQ: | > | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | > +------------------------------------------------------------+ > +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST