You are on page 1of 2

10/25/2019 macvim - Displaying Vim variables - Stack Overflow

Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen
now

Displaying Vim variables [duplicate]


Asked 8 years, 1 month ago Active 8 years, 1 month ago Viewed 5k times

Possible Duplicate:
Get current value of a setting in Vim
11
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.

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

Thanks.

vim macvim

edited May 23 '17 at 10:33 asked Sep 14 '11 at 18:11


Community ♦ chuck taylor
1 1 1,265 3 21 43

marked as duplicate by sidyll, Randy Morris, ib., Chris Johnsen, YOU Sep 15 '11 at 9:39
This question has been asked before and already has an answer. If those answers do not fully address your
question, please ask a new question.

1 Please close instead of answering duplicates, people. Above is one, here is another one. – sidyll Sep 14 '11 at
19:58

2 Answers

:set tw?

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

:verbose set tw?

For even more setting fun

https://stackoverflow.com/questions/7420968/displaying-vim-variables 1/2
10/25/2019 macvim - Displaying Vim variables - Stack Overflow

:options

answered Sep 14 '11 at 18:15


Peter Rincker
35.1k 6 53 79

BTY, this is showing options not variables. For variables the command is echo VAR . – nn0p Apr 22 '16 at
16:23

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 ? .
12
The disadvantage is that you cannot use this method with verbose .

answered Sep 14 '11 at 18:40


Randy Morris
34.2k 5 57 71

I upvoted, but Avoid answering duplicates Randy, close it instead. – sidyll Sep 14 '11 at 19:59

2 @sidyll - Apparently I've seen one of these in the past as I have voted for one of the answers, however I did
not remember it. If there is some secret way of duplicates popping out at me without me searching every
single question I decide to answer, I'm not seeing it. If you'd rather me leave questions unanswered that I
know an answer to because someone somewhere may have asked a similar question before that I am totally
unaware of I can start doing that instead. This answer was clearly posted at least an hour before you marked it
a duplicate and now that you have, I have voted to close. – Randy Morris Sep 14 '11 at 21:01

I see, no worries. Maybe the system will be improved enough in the future to find duplicates better; on the
other hand, it's asker's responsibility to search thoughtfully. And thanks for supporting my vote :-) – sidyll Sep
14 '11 at 21:20

https://stackoverflow.com/questions/7420968/displaying-vim-variables 2/2

You might also like