Binding a macro

I’ new into I was using PSPad before and liked it. Anyway, in PSPad there was availability to write own macro, so when I pressed, for example, CTRL+F6, it automatically wrote text instead of me. I had macro echo '<pre>';print_r();echo '</pre>';exit; and this is very usefull for debugging websites in PHP and now I miss that feature.

In Atom, this is called a snippet. You can’t bind a snippet to a specific keymap like you mention, but it’s close. See the Flight Manual here:

I add this:
'Debug PHP':
'prefix': 'debug'
body': 'echo "<pre>";print_r($1);echo "</pre>";exit;'
It doesn’t work as pressing F6, but start type debug, then tab and it goes well. Thanks for info, this is what I needed.

1 Like