How to autosave in Vim using no plugin?
I have found the following post:
which gives the following answer:
autocmd TextChanged,TextChangedI <buffer> silent write
which works perfectly except that when I put that in my .vimrc it doesn't work, so how can I put that line in my .vimrc such that it works everytime I open Vim ?
EDIT: It seems putting that line in .vimrc works WHEN I DON'T USE A SESSION !
So I will rephrase my question:
How can I get the above work in combination with mksession to open preconfigured session in Vim using vim -S ?