Skip to Content

You are here

Exit function shortcut on any function key(F10,F11,F12) Emacs

Add this code in your .emacs file

;; add exit( ) to php code
(fset 'add-exit
[?\C-e return tab ?e ?x ?i ?t ?\; ?\C-x ?\C-s])
;; set key for above macro
(global-set-key [f11] 'add-exit)
(global-set-key [(control shift e)] 'add-exit)