How can I track *all* changes in the active editor while typing/refactoring/etc?
Hello,
I want to track all changes, what are happening in the active editor. How can I register a listener on that? So far I have tried two things:
1) creating a new EditorAction (but this requires me to provide a shortcut to work.. or, there is a way to activate action for every keystroke?)
2) I've used VirtualFileManager.getInstance().addVirtualFileListener(), thou it looks too low level for me. I would like to have Document at my hand, not just VirtualFile.
Is there a more correct way of doing that?
Wbr,
Jevgeni
Please sign in to leave a comment.
Hi Jevgeni,
You can use com.intellij.openapi.editor.event.EditorEventMulticaster.addDocumentListener() for that
Denis
Denis, thank you! That is exactly what I was looking for
:)My pleasure :)
Denis