Saturday, April 23, 2016

Apparent inconsistency in use of 'ts' rather than 'sts' as default shiftwidth

The Vim docs for shiftwidth() indicate that when 'sw' is not set, 'ts'
will be returned. This is indeed the behavior I observe, but I'm
wondering why 'sts' (when applicable) wouldn't be a more logical
choice...

Hitting <Tab> at the beginning of a line indents by 'sts', whereas
hitting CTRL-T in insert mode indents by 'ts'. I think most users
would expect those two actions to produce the same effect. If indent
commands such as CTRL-T and >> are going to default to something in
the absence of 'sw', wouldn't 'sts' be the value that would produce
the most useful/least surprising behavior?

Thanks,
Brett Stahlman

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments: