Version 3 (modified by Sewi, 5 years ago) (diff)


Padre Plugin API hooks

Plugins could add hooks to Padre core functions.

Each of the following hooks is a key in the hash reference returned by the padre_hooks method of a plugin.

The value should be

  • a code reference
  • an array ref of code references

Related tickets: #1168

Note: The list should be sorted alphabetically ignoring "before_" and "after_" prefixes of hooks

Note2: The usage samples should give you a hint how a hook could be used. They may not be useful for other cases (like svn auto-commit).


Arguments none
Return value undef or text
Called before any file is written to disk
Usage Example tidy Perl source on every save

This hook should return undef if everything is ok. Any returned text is treated as an error message and shown to the user. The save process is stopped on the first hook returning an error message.


Arguments none
Return value ignored
Called after any file is written to disk
Usage Example svn commit on save