How do I unset a specific vim command?

set listchars=tab:>-,trail:_

I tried to unset the above command this way:

unset listchars=tab:>-,trail:_

But only get:

E492: Not an editor command: unset listchars=tab:>-,trail:_

What's the right way to do this?


This will reset the listchars option to the default:

set listchars&

See the options documentation for more info.


There are 3 primary ways to unset a variable. I will use the binary command here for demonstration purposes. One of them should work.

  1. set nobinary
  2. set binary&
  3. set binary!

Remember to reload the file you are working on for the values to apply again using :e