;*
;**** Zed - configuration file for Msdos
;*
;*  ^=control key, #=shift key, @=alt key

set indcfg 0x111

;*
;* ***** Cursor movement *****
;*

key \1B      e_escape   ; Esc     - escape command

key \50E0    c_down     ; Down ;*  Arrows - move cursor
key \48E0    c_up       ; Up
key \4dE0    c_right    ; Right
key \4bE0    c_left     ; Left

key \w5000   c_down     ; Down  keypad
key \w4800   c_up       ; Up    keypad
key \w4D00   c_right    ; Right keypad
key \w4B00   c_left     ; Left  keypad

key \w51E0   p_down     ;*  PgDn   - move cursor down one page
key \w49E0   p_up       ;*  PgUp   - move cursor up one page
key \w4FE0   g_eol      ;*  End    - goto end of line
key \w47E0   g_sol      ;*  Home   - goto start of line

key \w5100   p_down     ; Page Down  keypad
key \w4900   p_up       ; Page Up    keypad
key \w4F00   g_eol      ; End keypad   - goto end of line
key \w4700   g_sol      ; Home keypad  - goto start of line

key \u11\u13      g_sol      ;*  ^Q^S   - goto start of line
key \u11\u04      g_eol      ;*  ^Q^D   - goto end of line
key \u11\u05      g_sos      ;*  ^Q^E   - goto start of screen
key \u11\u18      g_eos      ;*  ^Q^X   - goto end of screen
key \u11\u12      g_sof      ;*  ^Q^R   - goto start of file
key \u11\u03      g_eof      ;*  ^Q^C   - goto end of file
key \u11\u02      g_sob      ;*  ^Q^B   - goto start of block
key \u11\u0B      g_eob      ;*  ^Q^K   - goto end of block
key \u11\u14      g_c2sos    ;*  ^Q^T   - current to start of screen
key \u11\u16      g_c2eos    ;*  ^Q^V   - current to end of screen
key \u11\u07      g_c2mos    ;*  ^Q^G   - current to middle of screen
key \u11\u0C      g_line     ;*  ^Q^L   - goto line #
key \u11\0004005B g_parent   ;*  ^Q [   - goto parenthesis
key \u11\0004005D g_parent   ;*  ^Q ]   - goto parenthesis
key \u11\u15      g_function ;*  ^Q^U   - goto C function
key \0B0          g_set0     ;*  ^K 0   - set mark 0
key \0B1          g_set1     ;*  ^K 1   - set mark 1
key \0B2          g_set2     ;*  ^K 2   - set mark 2
key \0B3          g_set3     ;*  ^K 3   - set mark 3
key \u110         g_go0      ;*  ^Q 0   - goto mark 0
key \u111         g_go1      ;*  ^Q 1   - goto mark 1
key \u112         g_go2      ;*  ^Q 2   - goto mark 2
key \u113         g_go3      ;*  ^Q 3   - goto mark 3
key \w4400        g_menu     ;*  F10    - menuenu
key \w3B00        f_select "<h" e_enter ;*  F1     - open help window

key \000284E0   g_sof      ;*  ^PgUp  - goto start of file
key \000276E0   g_eof      ;*  ^PgDn  - goto end of file
key \000277E0   g_sos      ;*  ^Home  - goto start of screen
key \000275E0   g_eos      ;*  ^End   - goto end of screen
key \000273E0   g_pwr      ;*  ^Left  - goto previus word
key \000274E0   g_nwr      ;*  ^Right - goto next word
key \00028DE0   g_sdown    ;*  ^Up    - scroll down
key \000291E0   g_sup      ;*  ^Down  - scroll up

; block extension by cursor

key \000150E0   b_setpnt c_down  b_cresize ; #Down
key \000148E0   b_setpnt c_up    b_cresize ; #Up
key \00014DE0   b_setpnt c_right b_cresize ; #Right
key \00014BE0   b_setpnt c_left  b_cresize ; #Left
key \000151E0   b_setpnt p_down  b_cresize ; #PgDn
key \000149E0   b_setpnt p_up    b_cresize ; #PgUp
key \00014FE0   b_setpnt g_eol   b_cresize ; #End
key \000147E0   b_setpnt g_sol   b_cresize ; #Home

key \000384E0   b_setpnt g_sof   b_cresize ; #^PgUp  - goto start of file
key \000376E0   b_setpnt g_eof   b_cresize ; #^PgDn  - goto end of file
key \000377E0   b_setpnt g_sos   b_cresize ; #^Home  - goto start of screen
key \000375E0   b_setpnt g_eos   b_cresize ; #^End   - goto end of screen
key \000373E0   b_setpnt g_pwr   b_cresize ; #^Left  - goto previus word
key \000374E0   b_setpnt g_nwr   b_cresize ; #^Right - goto next word
key \00038DE0   b_setpnt g_sdown b_cresize ; #^Up
key \000391E0   b_setpnt g_sup   b_cresize ; #^Down

;*
;* ***** Editing *****
;*

key \0d    e_enter       ; Enter
key \w53E0 e_canc        ;*  Canc   - delete character under the cursor
key \w5300 e_canc        ; canc keypad
key \08    e_bkspc       ;*  BackSpace - delete character at the left of the cursor
key \19    e_delline     ;*  ^Y     - delete row
key \w52E0 l_instog      ;*  Ins    - toggle insert/overwrite mode
key \w5200 l_instog      ; Ins keypad - toggle insert/overwrite

key \0B\04 e_deleol      ;*  ^K^D   - delete from cursor to EOLOL
key \u0B\u0A e_restore   ;*  ^K^J   - restore linene
key \0B\15 b_resdelb     ;*  ^K^U   - unerase linene
key \u0B\u14 f_killtab   ;*  ^K^T   - kill all tab in current file

key \03\03 e_putcode     ;*  ^C^C   - insert coded codes (enter ends)
key \03\09 e_inscode     ;*  ^C^I   - insert codes (enter ends)s)
key \03\08 e_hexcode     ;*  ^C^H   - insert hex code(enter ends)

key \00047800 e_toupper  ;*  @1     - char toupper
key \00047900 e_tolower  ;*  @2     - char tolower
key \00047A00 e_flipcase ;*  @3     - char flip case
key \u11\u10  l_autosave ;*  ^Q^P   - set autosave
key \00041C00 e_senter   ;*  @Enter - soft enter
key \0002007F e_deind    ;*  ^BackSpace - deindent row

;*
;* ***** File Selector *****
;*

key \u01       e_openall ;*  ^A     - open all files
key \u0E       e_hexopen ;*  ^N     - open file in binary mode
key \u14       e_roopen  ;*  ^T     - open file in readonly mode

;*
;* ***** Macro *****
;*

key \13\13 e_stmacro  ;*  ^S^S   - start macro
key \13\12 e_recmacro ;*  ^S^R   - record macro
key \13\01 e_abmacro  ;*  ^S^A   - abort macro
key \13\17 e_wrmacro  ;*  ^S^W   - write macro

;*
;* ***** File/Window *****
;*

key \w3C00 f_savefile   ;*  F2     - save file
key \0b\13 f_savefile   ;*  ^K^S   - save file
key \06\13 f_savefile   ;*  ^F^S   - save file
key \06\14 f_saveall    ;*  ^F^T   - save all file
key \0B\18 f_savefile w_qquit     ;*  ^K^X   - save/exit single file
key \u0B\u1A f_savemodif w_qquita ;*  ^K^Z   - saveall modified/exitall

key \w3D00 f_fileld     ;*  F3     - open file
key \06\0F f_fileld     ;*  ^F^O   - open file
key \06\15 f_filesb     ;*  ^F^U   - file substitution
key \0b\11 w_qquit      ;*  ^K^Q   - query quit
key \06\12 f_qreload    ;*  ^F^R   - file reopen with query

key \0B\05 f_chname     ;*  ^K^E   - change filename
key \06\01 f_chname     ;*  ^F^E   - change filename
key \11\11 w_qquita     ;*  ^Q^Q   - quit all with query
key \06\0E w_bufnext    ;*  ^F^N   - select next buffer
key \06\10 w_bufprev    ;*  ^F^P   - select previous buffer
key \06\0D w_bufsel     ;*  ^F^M   - select buffer

key \w3F00 w_zoom       ;*  F5     - zoom/unzoom window
key \17\1A w_zoom       ;*  ^W^Z   - zoom/unzoom window
key \17\15 w_zoomq      ;*  ^W^U   - set unique window/buffer
key \17\08 w_hide       ;*  ^W^H   - window hide

key \17\13 w_split      ;*  ^W^S   - split window & ask filename to load
key \17\12 w_winres     ;*  ^W^R   - resize window
key \17\0E w_winnext    ;*  ^W^N   - select next window
key \17\10 w_winprev    ;*  ^W^P   - select previous window

key \03\12 f_cconfig    ;*  ^C^R   - reload config file
key \u03\u01 f_aconfig  ;*  ^C^A   - add file to config

key \00042D00  w_qquita ;*  @X     - quit all with query
key \00048100  w_bufsel ;*  @0     - select buffer
key \00042100d f_shell e_enter e_enter  ;*  @F D   - os shell
key \00042100o f_shell  ;*  @F O   - os shell with parameter

;*
;* ***** Search/Replace *****
;*

key \11\06 s_search     ;*  ^Q^F   - start search
key \11\01 s_replace    ;*  ^Q^A   - start replace
key \11\09 s_isearch    ;*  ^Q^I   - start interactive search
key \0C    s_sagain     ;*  ^L     - redo search/replace

;*
;* ***** Block *****
;*

;*  #cursor_movement - create/extend block

key \0B\02 b_begin       ;*  ^K^B   - set start of block
key \0B\0B b_end         ;*  ^K^K   - set end of block
key \0B\0E b_toggle      ;*  ^K^N   - toggle column/normal block type
key \0B\08 b_hide        ;*  ^K^H   - hide/unhide block
key \0B\0C b_ldrag       ;*  ^K^L   - drag mode line on/off
key \0B\01 b_cdrag       ;*  ^K^A   - drag mode char on/off
key \0B\19 b_blockdel    ;*  ^K^Y   - block delete
key \0B\03 b_clphere b_clpcopy b_clppstd b_clpzero ;*  ^K^C   - copy block
key \0B\16 b_clphere b_clpcut  b_clppstd b_clpzero ;*  ^K^V   - move block
key \0B\12 b_clpdel b_clpload e_entwait b_clppstd  ;*  ^K^R   - block read
key \0B\17 b_clpdel b_clpcopy b_clpsave e_entwait b_clpdel ;*  ^K^W   - block write
key \0B\06 b_fill        ;*  ^K^F   - block fill
key \u0B\u09  b_indent   ;*  ^K^I   - indent C block
key \00049D00 b_shr      ;*  @right - block shift right
key \00049B00 b_shl      ;*  @left  - block shift left

key \0B\10 b_clpdel              ;*  ^K^P   - delete clipboard
key \000153E0 b_clpdel b_clpcut  ;*  #Canc  - clip cut
key \000292E0 b_clpdel b_clpcopy ;*  ^Ins   - clip copy
key \0004A200 b_clpcopy          ;*  @Ins   - clip copy/addpy
key \0004A300 b_clpcut           ;*  @Canc  - clip cut/addut
key \000152E0 b_clppaste         ;*  #Ins   - clip paste
key \000293E0 b_blockdel         ;*  ^Canc  - block delete

;*
;* ***** Document mode *****
;*

key \00049800   g_prevpar  ;*  @up    - goto previous paragraph
key \0004A000   g_nextpar  ;*  @down  - goto next paragraph
key \0F\12 j_rmargin       ;*  ^O^R   - set right margin
key \0F\0C j_lmargin       ;*  ^O^L   - set left margin
key \0F\09 j_indent        ;*  ^O^I   - set first row indent
key \0F\01 j_soft          ;*  ^O^A   - transform return in soft return
key \0F\08 j_hard          ;*  ^O^H   - transform return in hard return
key \0F\10 j_allhard       ;*  ^O^P   - transform all return in hard return
key \02    j_soft c_down   ;*  ^B     - add line to paragraphreturn
key \0F\02 j_soft c_down   ;*  ^O^B   - add line to paragraph
key \0F\03 j_center        ;*  ^O^C   - center row
key \0F\04 j_right         ;*  ^O^D   - align row to right
key \0F\13 j_left          ;*  ^O^S   - align row to left
key \0F\06 j_format        ;*  ^O^F   - format rowfo
key \0F\0A j_justif        ;*  ^O^J   - justify rowgrafo
key \0F\0B j_dejust        ;*  ^O^K   - de-justify rowgrafo
key \0F\0F l_doctog        ;*  ^O^O   - toggle document mode on/off
key \u0F\u07 j_block2par   ;*  ^O^G   - create a paragraph within block
key \12 j_quoterem j_dejust j_format j_justif j_quoteres ;*  ^R     - re-format paragraph

;*
;* ***** Special File Selectors *****
;*

;*  <C     - select the clipboard
;*  <D     - select the delete buffer
;*  <E     - select the system-wide configuration
;*  <G     - select the local configuration
;*  <H     - create the help
;*  <I     - select one of the buffer not visualized

;*
;* ***** Symbols for OS shell *****
;*

;*  %t : path of the current file
;*  %f : name of the current file (without path and extension)
;*  %e : extension of the current file
;*  %n : complete name of the file (without path)
;*  %w : word where the cursor was.
;*  %v : as %w but of the previous window (saved with w_winsave)
;*  %p : pause before return to Zed
;*  %r : pause before return to zed if the shell returns an error
;*  %s : save all modified buffers before executing the shell
;*  %k : as %s but when the shell terminates execution, all modified files are
;*       reloaded. Not usable with %i or %a.
;*  %x : write "Type exit to return to Zed" before executing the shell
;*  %i : stdout and stderr of the command executed are redirected throw a pipe
;*       in the current buffer. This is erased before the execution of the
;*       shell.
;*  %a : as %i, but the buffer is not erased (append)
;*  %o : executes the command in background (UNIX only)
;*  %d : drive of the current file (MS-DOS only)

; **********************************************************************
; **********************************************************************
; **********************************************************************

; macro per la tastiera italiana (macros for italian keyboard)

key \00042500 "{"  ; @k
key \00042600 "}"  ; @l
key \0004005B "["  ; (@gr)
key \0004005D "]"  ; (@gr)+
key \00040040 "@"  ; (@gr)
key \00040023 "#"  ; (@gr)
key \00042B00 "~"  ; @

;*
;* ***** Macro for C *****
;*

key \00041700 g_sol e_enter c_up "#include <>" c_left ;*  @I     - include
key \00041400 g_sol e_enter c_up \    ;*  @T     - separator (C)
                 "/**********************************" \
                 "*****************************************/" c_down g_sol
key \00041600 "unsigned "             ;*  @U     - unsigned
key \00042F00 "void "                 ;*  @V     - void
key \00043200 "\;" c_down c_left      ;*  @M     - comment row (asm)

;*

menu *File
 menu *Load
  item new_*Buffer  f_fileld
  item new_*Window  w_split
  item *Reload      f_qreload
  item same_b*Uffer f_filesb
 endmenu
 menu *Save
  item *File  f_savefile
  item *All   f_saveall
  item save/*Quit  f_savefile w_qquit
  item change_*Name f_chname
 endmenu
 menu close/*Quit
  item quit_*File  w_qquit
  item save/*Quit  f_savefile w_qquit
  item quit_*All   w_qquita
 endmenu
 menu os_shell
  item shell f_shell e_enter e_enter
 endmenu
endmenu
menu *Buffer
 item *Next     w_bufnext
 item *Previous w_bufprev
 item *Select   w_bufsel
 item close_*Others w_zoomq
endmenu
menu *Window
 item *Zoom/unzoom w_zoom
 item *Hide        w_hide
 item *Split       w_split
 item *Resize      w_winres
 item *Next        w_winnext
 item *Previous    w_winprev
endmenu
menu *Goto
 item start_of_line g_sol
 item end_of_line   g_eol
 item start_of_screen g_sos
 item end_of_screen g_eos
 item start_of_file g_sof
 item end_of_file g_eof
 item start_of_block g_sob
 item end_of_block g_eob
 item line_# g_line
 item *Parentesis g_parent
 item *C_function g_function
 item previous_paragraph g_prevpar
 item next_paragraph g_nextpar
 item mark_0 g_go0
 item mark_1 g_go1
 item mark_2 g_go2
 item mark_3 g_go3
 item set_mark_0 g_set0
 item set_mark_1 g_set1
 item set_mark_2 g_set2
 item set_mark_3 g_set3
endmenu
menu *Scroll
 item current_to_start_of_screen g_c2sos
 item current_to_end_of_screen g_c2eos
 item current_to_middle_of_screen g_c2mos
 item scroll_up g_sup
 item scroll_down g_sdown
endmenu
menu *Editing
 item *Delete_line e_delline
 item delete_to_*Eol e_deleol
 item *Restore_line e_restore
 item *Unerase_line b_resdelb
 item insert_*Coded e_putcode
 item insert_c*Ode  e_inscode
 item insert_*Hex   e_hexcode
 item de*Indent e_deind
 item char_to*Upper e_toupper
 item char_to*Lower e_tolower
 item char_*Flipcase e_flipcase
 menu *Search
  item *Search s_search
  item *Interactive s_isearch
  item *Replace s_replace
  item redo_*Last s_sagain
 endmenu
 menu *Macro
  item *Start e_stmacro
  item *Record e_recmacro
  item *Abort e_abmacro
  item *Write_to_file e_wrmacro
  item *Reload_config_file f_cconfig
 endmenu
 menu *Block
  item set_*Begin b_begin
  item set_*End   b_end
  item toggle_*Type b_toggle
  item *Hide b_hide
  item drag_line b_ldrag
  item drag_char b_cdrag
  item *Delete b_blockdel
  item *Copy b_clphere b_clpcopy b_clppstd b_clpzero
  item *Move b_clphere b_clpcut  b_clppstd b_clpzero
  item *Read b_clpdel b_clpload e_entwait b_clppstd
  item *Write b_clpdel b_clpcopy b_clpsave e_entwait b_clpdel
  item *Fill b_fill
  item c_*Indent b_indent
  item shift_*Right b_shr
  item shift_*Left b_shl
  item to*Upper b_toupper
  item tolo*Wer b_tolower
  item fli*P_case b_flipcase
  menu clipb*Oard
   item *Delete b_clpdel
   item *Save   b_clpsave
   item *Load   b_clpload
   item set_*Begin b_clphere
   item set_*Real_start b_clpzero
   item *Copy_to b_clpcopy
   item c*Ut_to b_clpcut
   item *Paste_from b_clppaste
   item p*Aste_del b_clppstd
  endmenu
 endmenu
endmenu
menu *Document
 menu *Set_margin
  item *Right j_rmargin
  item *Left j_lmargin
  item *Indent j_indent
 endmenu
 item ret_to_*Ghost j_soft
 item ret_to_*True j_hard
 item *All_true j_allhard
 item add_*Line j_soft c_down
 menu *Alignment
  item *Center_row j_center
  item *Right_row j_right
  item *Left_row j_left
 endmenu
 item *Format_row j_format
 item *Justify_row j_justif
 item *Dejusttify j_dejust
 item *Rejust_paragraph j_dejust j_format j_justif
endmenu
menu *C_program
 item *Block_indent b_indent
 item *Goto_function g_function
 item #*Include g_sol e_enter c_up "#include <>" c_left
 item *Comment g_sol e_enter c_up \
           "/**********************************" \
           "*****************************************/" c_down g_sol
 item *Unsigned "unsigned"
 item *Void "void"
 item *Make f_savemodif w_winsave w_split "errs" e_enter \
           f_shell "make" e_enter "%i" e_enter w_wingoto
endmenu

