Skip to Content

You are here

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)