[HOW TO] Trim right edges of a Document programmatically
I see that when saving a com.intellij.openapi.editor.Document, the right edges are being trimmed. Is there a way to call this functionality? My virtual files are not local file system files, and saving is not done on "focus-lost", but rather intentionally. I want to do this trimming business when "save" is pressed.
请先登录再写评论。
the answer is DocumentEx.stripTrailingSpaces()