Professional Documents
Culture Documents
Macvim - Displaying Vim Variables - Stack Overflow
Macvim - Displaying Vim Variables - Stack Overflow
Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen
now
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
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?
https://stackoverflow.com/questions/7420968/displaying-vim-variables 1/2
10/25/2019 macvim - Displaying Vim variables - Stack Overflow
:options
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 .
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