Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Displaying Vim variables [duplicate]

Tags:

vim

macvim

Possible Duplicate:
Get current value of a setting in Vim

I know that you can use :set to change Vim settings and that you can set up a configuration file ~/.vimrc but I'm running into some issues getting this to work with MacVim and I want to be able to display what a Vim environment variable is.

Is there a command like :show tw or something like this that will do this?

Thanks.

like image 829
chuck taylor Avatar asked Sep 14 '11 18:09

chuck taylor


Video Answer


2 Answers

:set tw?

or if you want to know where it is set as well

:verbose set tw?

For even more setting fun

:options
like image 65
Peter Rincker Avatar answered Sep 21 '22 09:09

Peter Rincker


In addition to the accepted answer you may also use :echo &tw.

This has the advantage that you can't accidentally set a boolean option by forgetting to add the ?. The disadvantage is that you cannot use this method with verbose.

like image 41
Randy Morris Avatar answered Sep 21 '22 09:09

Randy Morris