home *** CD-ROM | disk | FTP | other *** search
- RI(9)/VEDIT Family - Keystroke Macros/
- M(H) !Display header
-
- YT/
- Keystroke macros let you assign a commonly typed sequence of keys to a single
- key. Pressing that single key then types the whole sequence - saving you
- time and reducing the chances for error.
-
- For example, if you were repeatedly typing the phrase "attached and included
- herein by reference", you could define the key <CTRL-A> to type out the
- whole phrase each time it was pressed.
-
- Keystroke macros are also used to set up "hot keys" for accessing the menu
- functions directly. This speeds editing for the experienced user.
-
- With VEDIT PLUS, keystroke macros have the additional capability of accessing
- the powerful Command Mode macro language. This lets you create almost any edit
- function you might want.
-
- You can set up as many keystroke macros as you like. Keystroke macros can be
- "temporary" or can be built permanently into the editor.
-
- /
- M(K)
-
- YWB(1) 9
- Q26YEA !Set editing attribute
- YWS(1) Q27YEA !Set attribute in lower window "1"
- EZY !Empty edit buffer
- EB demo.txt !Load demo file
- Z !Goto end-of-file
-
- EE(1)
- B#K
- I/In this example keystroke macro, you will assign the words "VEDIT PLUS" to the
- key <CTRL-V>. <ALT-K> is itself a keystroke macro which performs the {MISC,
- Keystroke Macros, Record} menu function.
-
- Press <ALT-K>. At the prompt press <CTRL-V> and then <ESC>. You are now in
- "Record Mode" - note the status line. Type "VEDIT PLUS". Press <ALT-K> again
- to turn off record mode. Press <CTRL-V>. If all went well, the words "VEDIT
- PLUS" will appear. --- Press <ESC> to continue ---/
- B -V
- EE(@)
- V
-
- EE(1)
- B#K
- I/Many pre-configured keystroke macros directly access functions in the menu
- system as "hot keys". For example, <ALT-F3> is configured to perform [MENU],
- select the "Goto" sub-menu and select the "Matching ()" function. Therefore,
- we say that <ALT-F3> is a "hot key" for {GOTO, Matching ()}.
-
- You can view all of the active keystroke macros by entering the "Misc" sub-
- menu (press <ALT-M>), selecting the "Keystroke Macros" sub-menu and selecting
- "Display Macros". Note that the last displayed macro is for "^V" which you
- just added. --- Press <ESC> to continue ---/
-
- B -V
- EE(@)
- V
-
- EE(1)
- B#K
-
- I/Now lets add another "hot key" to directly access the {HELP, Status Display}
- function. We will assign it to <SHIFT-F1>. Sub-menus and most menu functions
- can simply be selected by their first letter.
-
- Press <ALT-K>. At the prompt press <SHIFT-F1> and then <ESC>. Now press
- press <F1>, then "H", then "S". Press <ALT-K> again to turn off the record
- mode. Try out the new keystroke macro by pressing <SHIFT-F1>. The pop-up
- status display should appear.
- --- Press <ESC> to continue ---/
- B -V
- EE(@)
- V
-
- EE(1)
- B#K
- I/Display the keystroke macros again using {MISC, Keystroke Macros, Display}.
- Note that the new "SHIFT-F1" is shown as "[MENU]-HS". Therefore, <SHIFT-F1>
- is the same as pressing the [MENU] key, then "H" and then "S".
-
- VEDIT remembers keystroke macros in terms of the functions they access, e.g.
- [MENU], and NOT the keys assigned to the functions, e.g. <F1>. This way,
- should the keyboard layout change (e.g. you assign a different key to [MENU]),
- the keystroke macros will still work.
- --- Press <ESC> to continue ---/
- B -V
- EE(@)
- V
-
- EE(1)
- B#K
- I/You can also enter new keystrokes by using {MISC, Keystroke Macros, Add}
- (assigned to <CTRL-D>). Instead of recording your keystrokes while you edit,
- you enter the keystrokes directly into a window. This method if preferable
- for keystroke macros which access VEDIT PLUS's command macro language.
-
- Lets redo our first example using this method. Press <CTRL-D>. At the first
- prompt press <CTRL-V> and <ESC>. Press "Y" to confirm. At the second prompt
- type "VEDIT PLUS" and press <ESC>. Now press <CTRL-V> to test it. "VEDIT
- PLUS" should again appear. --- Press <ESC> to continue ---/
- B -V
- EE(@)
- V
-
- EE(1)
- B#K
- I/Now lets use VEDIT PLUS's macro language to create an editing function to
- delete characters from the beginning of the line up to the cursor:
-
- Press <CTRL-D>. At the first prompt press <CTRL-B>. Then press <ESC>. At
- the second prompt first press <CTRL-E> (this is the [VISUAL EXIT] function).
- Then type (without quotes) "0K". Then press <ESC> again.
-
- Move the cursor to the middle of a line and press <CTRL-B>. The characters
- before the cursor will be deleted. --- Press <ESC> to continue ---/
-
- B -V
- EE(@)
- V
-
- EE(1)
- B#K
- I/This keystroke macro also uses VEDIT PLUS's macro language to create an
- editing function to duplicate a line of text:
-
- Press <CTRL-D>. At the prompt press <ALT-D>. Then press <ESC>. At the
- second prompt first press <CTRL-E>. Then type (without quotes) "0L G". Then
- press <ESC> again.
-
- Press <ALT-D>. If all went well, the current line of text will be duplicated.
- --- Press <ESC> to continue ---/
- B -V
- EE(@)
- -L -@$N/|S|A/ 0L !Position cursor
- V
-
- EE(1)
- B#K
- I/The menu function {CONFIG, Save into VEDIT} can be used to save new
- keystroke macros (and other configuration changes) permanently into VEDIT.
-
- VEDIT PLUS comes with two libraries of useful macros including a library of
- commonly requested keystroke macros. VEDIT PLUS also has the ability to
- convert keystroke macros into an easy to edit file format. Keystroke macros
- which use VEDIT PLUS's macro language can also be built into VEDIT - VEDIT can
- run any macros written with VEDIT PLUS.
- --- Press <ESC> to return to the Main Menu ---/
- B -V
- EE(@)
- V
-