jeromejj / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

echo options when changing them #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run `:set showcmd!`
2. forget what was actually set (possibly after using `@:` a few times)
3. run `:set showcmd?` to see what's set

What is the expected output? What do you see instead?
It'd be cool to have options get echoed out (as if you'd typed `:set 
showcmd!<cr>:set showcmd?<cr>`) once you change them to make it more obvious as 
to what's set after your change.  This could happen even without using the bang 
to toggle the option, but I think it would be most useful in that case.

Original issue reported on code.google.com by j...@bendyworks.com on 12 Mar 2013 at 6:02

GoogleCodeExporter commented 9 years ago
While not builtin, you can easily define a command that does this:
Take this example: 

:com! -complete=option -nargs=1 Toggle :set <args>!|set <args>?

Then you can do :Toggle nu
and Vim will turn on numbering and show the actual value of the number option.

Original comment by chrisbr...@googlemail.com on 11 Oct 2014 at 8:20

GoogleCodeExporter commented 9 years ago
Closing this for now. Use the provided command to achieve what you want.

Original comment by chrisbr...@googlemail.com on 21 Oct 2014 at 4:13