Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you echo the existing settings in Vim?

Tags:

vim

So I'm working on updating my .vimrc file since it's a gigantic mess currently. What I'd like to be able to do is give a command to vim to get it to echo the existing settings.

For example, in my .vimrc I have

set shortmess += r

Now, going off of the help file, I know that shortmess has currently more options turned on than r - but I don't know what they are! How do I get vim to echo the currently active settings to me?

like image 613
Zxaos Avatar asked Dec 15 '10 02:12

Zxaos


People also ask

How do I find Vim options?

1. Enable the options for an individual file inside the Vim session using :set Open the desired file in Vim, type any option using the :set command in the Normal mode, and press Enter. 2. Enable the options permanently for all the files by specifying them in the local Vim configuration file ~/.

How can I edit vimrc file?

Opening vimrc Using file name completion, you could type :e $M then press Tab until you see the desired variable. If you only want to see the path, type :echo $M then press Tab to see the variable, and press Enter. In gvim, the Edit menu includes "Startup Settings" which will use $MYVIMRC to edit your vimrc file.

Where is my Vim config file?

The global or system-wide vim configuration file is generally located under the /etc/vim/vimrc . This configuration file is applied to all users and when Vim is started this configuration file is read and Vim is configured according to this file contents.


2 Answers

:set, or if you just want that one option, :set shortmess?.

like image 174
ephemient Avatar answered Sep 22 '22 09:09

ephemient


Two ways:

echo &shortmess

or

set shortmess
like image 45
Herbert Sitz Avatar answered Sep 22 '22 09:09

Herbert Sitz