A
/ \ _ Play Now Nemesis on
| | | | _______ _ _ _______ _______ _ _______
| |\ | | | ____| | \ / | | ____| / ____| | | / ____|
/-------/-------------------------------------------------------------------,
O= Home <=XX| About News Pics Adventurers Wizards Download Connect >
\-------\-------------------------------------------------------------------'
| | \ | | |____ | | | | | |____ ___ \ \ | | ___ \ \
| | \_| |_______| |_| |_| |_______| |_______/ |_| |_______/
\ /
V
ED editor F.Y.I. (Poe, Mar 7 1993, 45)
Here are some things which are in the editor but aren't commonly known which
you might find handy to use some time. This is just "For Your Information"
What we call 'ed' here is actually the same as unix 'ex' except maybe for a
few things which don't really matter to the user. So, what can you do with
'ed'? Lots... you probably already know the commands: a, d, p, c, i, x, w, q
and so on, but here I'll explain some other lesser known commands.
First, replacing text on a line or globally is easy to do for instance if you
need to change the name of a variable in the file you can do it with one easy
command and 'ed' will change all occurances of that variable, here is how the
substitution system works...
At the comamnd line:
s/pat1/pat2/ replaces the first occurance of pat1
in a line with pat2.
/pat/d deletes the next line with pat in it
/dog/s/dog/hog/ find the next line with dog in it and
then replace dog with hog
/dog/s//hog/ does the same as /dog/s/dog/hog/
g/house/s//home/g replaces all occurances of house with
home
Addresses
In the following "x" and "y" are integer numbers corrosponding to lines.
At the command line:
x go to line x and display it.
x,y lines x to y
. the current line
+n the line which is n lines after the current
line.
-n the line which is n lines before the current
line.
Using these you can add the normal commands (i.e. a, c, i, p, d, m) to them
to do multiple commands.
At the command line:
x,yp displays lines x through y
na append text after line n
x,yd delete lines x to y
x,ymn moves lines x to y to after line n
Here are some examples:
1,5p shows lines 1 through 5
6a append after line 6
7,21d deletes lines 7 to 21
3,5m7 moves lines 3 to 5 after line 7
Reading in a file, appending to a file, writing to a new file.
Here's how to read in a file into your current file:
At the command line:
xr filename
This appends the contents of filename after line x. In practice you might
type 5r filename or r filename. Without a line number it will append the file
after the current line.
Appending lines to a file.
At the command line:
x,yw filename
This will write lines x through y to filename. If no line numbers are
spcified it saves the whole file as filename.
There's even more you can do with the editor that I'll write down later...
BTW, I took these examples from and ex reference card published by the
Waite Group, inc. <-so I don't get arrested :)
>>-Poe-> Chris.
This board is to document how to code various stuff in Nemesis.
Within Nemesis it is located in the inner guild in the village.
If you have written documents that should be placed here or
if you think something important is missing please contact an
Archwizard - see 'help admin' or https://nemesis.de/lpc/help/admin .
Nowadays especially new features etc. are posted here.
The board contains 49 notes:
- living (Lynx, Sep 19 1991, 28)
- short descriptions (Lynx, Sep 19 1991, 28)
- building guilds (Lynx, Sep 19 1991, 28)
- Ok. prompts (Lynx, Sep 20 1991, 28)
- Yell command (Lynx, Sep 21 1991, 28)
- simulated efuns (Lynx, Sep 22 1991, 28; Kiri, Jan 28 2017, 62)
- Re: short descriptions -> inventory display (Lynx, Sep 24 1991, 28)
- ships (Junky, Sep 30 1991, 30; revised by Kiri, Jun 4 2016, 62)
- introducing a new quest (Lynx, Oct 8 1991, 28)
- storing data in the player (Lynx, Oct 8 1991, 28)
- setting a user-definable prompt (Snake, Jan 6 1992, 66)
- Test Players (Junky, Jan 9 1992, 40; revised by Kiri, Jul 27 2016, 62)
- the colourful magazine (Snake, Feb 13 1992, 66; Kiri, Jun 4 2016, 62)
- new room support: room2.h (Junky, Mar 27 1992, 55)
- Skills (Junky, Mar 27 1992, 55)
- Indent within ed. (Lynx, Jul 25 1992, 49)
- Re: Indent within ed. (Poe, Aug 4 1992, 41)
- Properties (Junky, Aug 25 1992, 55)
- Timedependent objects (Junky, Sep 11 1992, 55)
- lfun produce (Lynx, Feb 9 1993, 60)
- ED editor F.Y.I. (Poe, Mar 7 1993, 45)
- conditional operator (Poe, Aug 13 1993, 46)
- Indirection (Poe, Nov 23 1993, 48)
- lfun search for all objects (Kiri, Jun 1 2016, 62)
- obj/monster: set_alias & set_brave (Kiri, Jun 4 2016, 62)
- Re: simulated efuns (Kiri, Jun 4 2016, 62)
- all "dead" (non-living) objects: query_name (Kiri, Jun 7 2016, 62)
- obj/monster: second_life supports argument (Kiri, Jun 10 2016, 62)
- obj/postoffice: generic post office (Kiri, Jun 11 2016, 62)
- obj/living: room property P_NO_MAGIC finally! (Kiri, Jun 12 2016, 62)
- simul_efun: valid_id & living: find_id (Kiri, Jul 17 2016, 62)
- obj/sign: improved (Kiri, Jul 18 2016, 62)
- obj/item: the replacement of obj/treasure (Kiri, Jul 19 2016, 62)
- obj/text: improved (Kiri, Jul 19 2016, 62)
- obj/key: improved (Kiri, Jul 19 2016, 62)
- obj/map: ready for persistence (Kiri, Jul 19 2016, 62)
- obj/treasure: legacy but persistent (Kiri, Jul 26 2016, 62)
- obj/chest & obj/bag: improved & persistent (Kiri, Jul 27 2016, 62)
- wiz command: localcmd (Kiri, Aug 12 2016, 62)
- obj/monster: set_cap_name, query_name & a hack (Kiri, Aug 12 2016, 62)
- obj/door2: a new door system (Kiri, Aug 12 2016, 62)
- room2.h: tutorial revised / changes & fixes (Kiri, Aug 12 2016, 62)
- keeping track of object versions (Kiri, Aug 17 2016, 62)
- About Colours (Kiri, Sep 17 2016, 62)
- clean_up: a garbage collection! (Kiri, Dec 27 2016, 62)
- containers: query_put_prep (Kiri, Jun 15 2017, 62)
- Re: obj/board: changes (Kiri, Jun 16 2017, 62)
- new 'more' via obj/more (Kiri, Sep 13 2017, 62)
- Re: New & Changed [Wiz] Commands (Kiri, Sep 26 2017, 62)
This page was generated in LPC
Imprint / Impressum