How to set/unset options in Vim

Vim is a very powerful text editor and as such it has lots of options which allows you to configure it “just right” for you! In order to configure it you can set up values to its various options either in the current window you are working on or in configuration file so that every new instance launched will have common settings. This file is usually called vimrc and is located under your home catalog.

But what happens if you wish to reset the value of an option you have configured in this configuration file for just this window that you are currently working in? I found that to be more difficult than expected so, here is how you can:

  1. Start a clean instance of vim with all its default options that ignores all the settings in all the user defined configuration files
  2. Get the currently set options and their values
  3. Disable/reset options that I will call switches
  4. Reset any option to each default value (whatever that might be)
Continue reading “How to set/unset options in Vim”