# insert column under cursor - shift text to right of cursor one column right
map `cs-.' `if cb `goto start while cb `` ' left down' up''
# delete column to left of cursor - shift text under and to right of cursor one column left
map `sa-,' `if cb `goto start while cb `bs if !b right down' left up''
# insert column to left of cursor - shift text under and to right of cursor one column right
map `sa-.' `if cb `goto start while cb `` ' if !b left down' right up''
# allow use of mouse to select, copy and delete blocks of text; separate clipboards are maintained for the left and right mouse-buttons;
# shift-(left-mouse-button click): define start and end of current block; automatically copies block into left clipboard; automatically undefines old block
# ctrl-(left-mouse-button click): goto start of current block
# alt-(left-mouse-button click): goto end of current block
# shift-alt-(left-mouse-button click): copy contents of left clipboard above to the line clicked upon
# ctrl-shift-alt-(left-mouse-button click): delete current block after copying it into left clipboard
# return: return-with-indent which handles DME bug of adding 2 lines at the end of a file;
# shift-return: return-with-indent-and-text-split which handles DME bug of adding 2 lines at the end of a file;
map `return' `last ifelse b `split firstnb down down deline' `split firstnb down' '
map `s-return' `ifelse b `split down down deline up firstnb' `split firstnb' repeat cleft `first down ` ' up' firstnb down'
# del: TRUE delete, including end-of-line join; handles rich and varied set of bugs with join command
# shift-del: TRUE word-delete, etc.
# shift-alt-del: line-delete
map `del' `ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc'''
map `s-del' `ifelse ca `resettoggle 0' `settoggle 0' settoggle 3 while 3 `ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc'' ifelse 0 `resettoggle 3' `if !ca `resettoggle 3''''
map `sa-del' `deline'
# bs: TRUE backspace, including end-of-line join; handles rich and varied set of bugs with join command
# shift-bs: TRUE word-backspace, etc.
# shift-alt-bs: line-delete
map `bs' `ifelse l `ifelse t up `up last'' left ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc'''
map `s-bs' `settoggle 3 while 3 `ifelse l `ifelse t up `up last'' left ifelse l `resettoggle 3' `left if !ca `resettoggle 3' right' if !ca `resettoggle 3' ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc''''
map `sa-bs' `deline'
# prompt: replace current file with new one; prompt: open new window with new file
map `f1' `escimm `newfile ''
map `s-f1' `escimm `newwindow newfile ''
# prompt: insert file before current line; prompt: change name of current file
map `f2' `escimm `insfile ''
map `s-f2' `escimm `chfilename ''
#prompt: save file as ?; save current file
map `f3' `escimm `saveas ''
map `s-f3' `saveold'
#safe quit; save current file then quit
map `f4' `quit'
map `s-f4' `saveold quit'
#execute the right and left clipboards as macros
map `f5' `source dme.R.clip unblock'
map `s-f5' `source dme.L.clip unblock''
# open small windows to view contents of the left and right clipboards
# find/replace previous occurrence of find-string; differs from prevr in that it will change word under the cursor (allowing you to selectively find-and-replace with a minimum of keystrokes)
# prompt: find/replace all previous occurrences of find-string
map `f7' `prev'
map `s-f7' `ifelse r `if !b `down first'' `right' prevr'
# find/replace next occurrence of find-string; differs from findr in that it will change word under the cursor (allowing you to selectively find-and-replace with a minimum of keystrokes)
# prompt: find/replace all subsequent occurrences of find-string
map `f8' `next'
map `s-f8' `ifelse l `if !t `up last'' `left' nextr'