On 2025-02-26 10:31, D. Ben Knoble wrote:
> On Tuesday, February 25, 2025 at 7:10:46???PM UTC-5 Tim Chase wrote:
>>> Sets the indent in the lines to [indent] (default 0).
>>
>> indenting with N spaces rather than respecting 'shiftwidth' and 'expandtab'
>> [snip]
>> Is there a way to get the indent-count parameter of `:left` to behave
>> like using the > motion (which respects 'shiftwidth' and 'expandtab')?
>
> It took me a while to figure out what the question was, but I think you
> could something like this:
>
> V<motions>:left N | *retab!
The gist of my question/hope was wanting to get the N in
:left N
to prepend N *indents* (using N tabs if 'noet' and N*shiftwidth if 'et'
is set)
As it currently stands, with 'et' set, I get N spaces, not N
'shiftwidth', and if I have 'noet' set, I get int(N/tabstop) tabs
followed by mod(N, tabstop) spaces. E.g.
:set ts=8 sw=4
with
:set et
:'<,'>left 10
puts 10 spaces at the beginning of each trimmed line.
And without 'et' set:
:set noet
:'<,'>left 10
gives me one tab (8-worth) followed by 2 spaces.
Neither gives me 10 tabstops or 10 shiftwidths which is what I'd
expected.
-tim
--
--
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 visit https://groups.google.com/d/msgid/vim_use/Z7-1hYLwzJ6SYKmO%40thechases.com.
Wednesday, February 26, 2025
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment