Skip to main content
6 events
when toggle format what by license comment
Mar 28, 2018 at 21:17 comment added Rich @LEI Yeah, the OP's existing solution that they're looking to replace already applies the substitution to the entire file on save. Your point about non-insert edits is a very good one, though: I'll update my answer.
Mar 28, 2018 at 19:59 comment added LEI Indeed I overlooked the conflict part of the question. My point is that InsertLeave does not cover all edits like pasting or moving text, until you enter in insert mode.
Mar 28, 2018 at 19:35 comment added Rich @LEI It would be quite tricky to track all the lines that have been edited if you want to do the substitution on save, though.
Mar 28, 2018 at 17:52 comment added LEI You may also be interested by the CursorHold event. Personally, I prefer to execute the substitution on save for specific file types with BufWritePre.
Mar 28, 2018 at 13:22 history edited Rich CC BY-SA 3.0
add keepjumps
Mar 28, 2018 at 13:08 history answered Rich CC BY-SA 3.0