Suppose I had tabstop set to 4 in
~/.vimrc. When I edit a file, I set the tabstop to 5 with
:set tabstop=5. After that, I close vim and restarted the terminal. When I open the file again, the tabstop for that file is still set to 5. How to make vim forget all settings (not just tabstop) I made (which I forgot) in that specific file?
Currently, when I open a previously opened file, it restores everything (settings, cursor position, etc) the way they were when I last left it. I'm not sure what causes this though. Here's my .vimrc, I guess it has something to do with
What I have tried:
- reset all settings with
:set all&and reload vimrc with
:source $MYVIMRC. Somehow the syntax highlighting is off afterward.
- Create a duplicate file, delete the original one, rename the duplicate file to the original one. No effect.