Using '[ after :w

Why does ‘:w’ overwrite the '[ mark and is there a way around it? It’s really annoying cause I can’t select pasted text when I’m using my autosave plugin…

:w is considered a change for the range being written, which is the entire buffer by default. If you want to avoid changing the mark, you can use :lockmarks write.

Alternatively, since the OP is just bothered by his autosave plugin,
maybe he can just tweak his plugin a little bit:

  • Before save the buffer,
  • get the mark of ‘[’ and after saving, reset the mark of ‘[’

This way he doesn’t need to change his muscle memory of “:w”.