Yes, my query is originally regarding Shift+>, which seemed to be the only 
way to indent a block of code.
Tab and spacebar would work on individual lines, but not highlighted blocks.
Ultimately, I need the block to indent 2 spaces to match previous code's 
indentation so the code and file functions.
How to indent highlight code is the main question then, regardless if it's 
Spacebar, Tab or Shift+>.
According to :h 30.5, spacebar is best practice, to avoid trouble with 
programs that use a different tabstop value.
However having to manually spacebar multiple lines in my highlighted block 
is time consuming and manually messy.
For now, tabs have been set to 2 spaces, which has carried over to the 
Shift+> functionality.

On Sunday, 29 June 2025 at 07:47:53 UTC+2 Christian Brabandt wrote:

> Hi,
> There is extensive documentation and guidance around how to use tabs in 
> the user manual at 
> :h 30.5
>
> Thanks 
> Chris
>
> Am 28.06.2025 um 09:20 schrieb K otgc <[email protected]>:
>
> Just entering :set sw=2 in .vimrc leaves tabbing at 8 spaces.
>
> The post 27 Jun 2025, 15:25:24 with 3 lines of code, is the only code 
> that works to affect tabbing at 2 spaces.
>
> On Friday, 27 June 2025 at 18:30:52 UTC+2 Gary Johnson wrote:
>
>> On 2025-06-27, K otgc wrote: 
>> > Hello, 
>> > I'm indenting a code block by highlighting the block and then selecting 
>> the 
>> > greater than key. 
>> > However this indents the block 8 spaces, which is too far past the 
>> other code 
>> > blocks, which are only 2 spaces indented. 
>> > I am using version: VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 02 
>> 2025 
>> > 16:39:51) 
>> > Is there a way to adust the indent please? 
>>
>> Yes. As someone else wrote, see 
>>
>> help > 
>> help 'sw' 
>>
>> and just execute, or put in your vimrc, 
>>
>> :set sw=2 
>>
>> Regards, 
>> Gary 
>>
>> -- 
> -- 
> 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 [email protected].
> To view this discussion visit 
> https://groups.google.com/d/msgid/vim_use/71db5174-cd0d-43fe-812f-918f719733f7n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/vim_use/71db5174-cd0d-43fe-812f-918f719733f7n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_use/6d010cfd-3417-4823-a3af-c888c5cf2da0n%40googlegroups.com.

Reply via email to