4

I know i can load a new or reload a vimrc file with the :source command. But is there a reverse to this? Because every source only adds to vim.

For example. if I would load a vimrc file to map F5 to a certain action. would i be able to unload this binding? And what about custom function

2
  • 3
    I'm voting to close this question as off-topic because it would be better on Unix & Linux.
    – Blrfl
    Apr 25, 2016 at 10:40
  • 1
    You could probably save a session, then source your files. To restore previous settings, close vim and restart, loading the session.
    – VanLaser
    Apr 25, 2016 at 18:24

1 Answer 1

5

You can have a look at the Tim Pope's plugin scriptease, it has a Disarm command. I think it's the closest I know for your issue.

You can also want to create a custom source function that keep track of everything that has been added from the source command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.