Conversation
Let's fix this. Instead of let s:defaults = {}
function! s:DefaultSet(option, value) abort
let s:defaults[a:option] = a:value
endfunctionAt the bottom of the plugin, we can set each option after we check for it. Please limit to Vim 7.4 compatible syntax: No lambdas, no |
9d3528d to
5f31747
Compare
|
Great idea — I've just force-pushed an implementation. It's still faster than before and it also simplifies the configuration part.
… though I'm not sure if |
5f31747 to
f039d07
Compare
6550d9c to
13bd446
Compare
|
I've cleaned up the commits and added code to support un-queried (non- |
Well, you were right in #191 that anything other then
verb setg all q?moves the cursor. That was not readily apparent from the repo's history, and I still can't find the explanation. I've tried several approaches with no luck.The approach in this PR is to query all settings of interest at once in the beginning. Finding the appropriate query + answer for each checked setting, then, requires just a little tweaking of your initial "home" regex. A downside is that any future queries will need to be registered in
s:mayset_checksbefore usage.It may not matter much on modern machines, but the previous version is a little slow on old boxes and on "semi"-embedded — at least as a percentage of a modest
vimrc's startup time. Make of it what you will.I've left some debug checks commented out, as they might come in handy.