Sublime Forum

Input handler that remembers the previous input

#1

What the easiest way to implement the initial text command of TexInputHandler so that the initial text is the user previous input from the last time the handler was called?

0 Likes

#2

initial text is the user previous input from the last time the handler was called?

By this, if you mean that you need the entered text of the user between subsequent command invocations of the handler, you would need to persist that data somewhere on disk, maybe in a sublime settings file (or some other file).

0 Likes

#3

I see. Thanks for the help

0 Likes

#4

Iirc OdatNurd made a video about input handlers with a nice way to do this without the need to store it in a settings or other file (of course only works until Sublime Text is closed the next time). Let me see if I can find it.

Edit: here it is (timestamp 3:48):

1 Like