Inserting settings into a document in vim
After trying out a new setting in vim, I’ll add it to my .vimrc. This is fine if it’s something like set hlsearch, but if it’s a new setting for the statusbar format or a new grepprg value, it can be quite complex to remember what you need to set it to.
Luckily, vim lets you insert the value of a setting into the document with a few easy-to-remember key strokes.
When in insert mode: Ctrl-r = & followed by the setting name and enter. Don’t know why I didn’t think of it before.
Add a comment