Saturday, January 18, 2020

Re: set all - each option one line

If you can't build or obtain a very new vim version, using the python interface can serve with a bit of work.  Use the :ver command to see what

For example, my vim is compiled with python3, so in a scratch buffer
py3 << eof
b = vim.current.buffer
for k in vim.options:
    b.append(k + '=' + str(vim.options[k]))
eof

That's global options only, there's buffer-local and window-local options too.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/799ff61b-0fc4-474c-a50f-c755135bfafb%40googlegroups.com.

No comments:

Post a Comment