Skip to Content

You are here

samantha's blog

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])

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

 

Add this code in your .emacs file

;; add print_r( ) to php code
(fset 'add-printr
[?\M-w ?\C-s ?\; ?\C-m return tab ?p ?r ?i ?n ?t ?_ ?r ?( ?\S- ?) ?\; left left left ?\C-y ? right right right ?\C-x ?\C-s])
;; set key for above macro
(global-set-key [f10] 'add-printr)

Subscribe to RSS - samantha's blog