Vos commentaires

This can already implemented via  plugin using

EventListener.on_pre_save()


There's no reason for this specific functionality to be a part of the core API.


Would look similar to this (haven't tested):



import sublime_plugin

import re


class AutoUpdaterThing(sublime_plugin.EventListener):

on_pre_save(self, view):

r = self.view.find('regex_pattern_here', 0)

self.view.replace(edit, r, 'whatever you want dynamically inserted'