Sublime Forum

How to run a command to modify my file?

#1

Hello,

I just wrote a php indenter that fit my taste.
It takes code to indent from stdin and output indented code to stdout.

Is it possible to run my indenter from ST3 ?
Something like “I press a key, my program is executed with the current file as stdin and output replace the current tab content”

Thanks for any hint.

Regards.

0 Likes

#2

You can write a package for Sublime Text using the Sublime Text API: https://www.sublimetext.com/docs/3/api_reference.html

0 Likes

#3

Thanks !
This is what I’ve done.

1 Like