# How to set tab size for hunks in “git add -p”?

3 messages from 2013-08-23 to 2013-08-24. Participants: Янчарук Александр, Antoine Pelisse.
Thread: https://gitlist.dev/t/34752

## Янчарук Александр, 2013-08-23 17:28

Subject: How to set tab size for hunks in “git add -p”?
Message-ID: <52179BAB.3040505@itvault.info>
URL: https://gitlist.dev/e/52179BAB.3040505%40itvault.info

```
Hi!

I used the solution from here 
<http://stackoverflow.com/questions/15132325/how-to-set-tab-size-for-pager-used-in-git-diff> 
to change tab size in |git diff||| output. That works fine with git diff.

I have these settings in my *.gitconfig*:

    |[core]
    whitespace = tabsize=4,indent-with-non-tab
    pager = less -FSRX -x4
    |

But those settings seems does not affect on |git add -p|. How to set tab 
size for hunks in *git add -p* command?

Thanks in advance!

-- 
Best regards,
Alexander Yancharuk
alex@itvault.info <mailto:alex@itvault.info>

```

## Antoine Pelisse, 2013-08-23 18:19

Subject: Re: How to set tab size for hunks in “git add -p”?
Message-ID: <CALWbr2xvMtXddpnkVs8TkSiaLcmpJGY7_hUTa3r_1X1SgDyhng@mail.gmail.com>
URL: https://gitlist.dev/e/CALWbr2xvMtXddpnkVs8TkSiaLcmpJGY7_hUTa3r_1X1SgDyhng%40mail.gmail.com
In-Reply-To: <52179BAB.3040505@itvault.info>

```
On Fri, Aug 23, 2013 at 7:28 PM, Янчарук Александр <alex@itvault.info> wrote:
> But those settings seems does not affect on |git add -p|. How to set tab
> size for hunks in *git add -p* command?

That's because "git add -p" doesn't go through less/pager.
You can certainly change the tabs size for your terminal with "tabs -4" though.

```

## Янчарук Александр, 2013-08-24 09:53

Subject: Re: How to set tab size for hunks in “git add -p”?
Message-ID: <5218828E.2020000@itvault.info>
URL: https://gitlist.dev/e/5218828E.2020000%40itvault.info
In-Reply-To: <CALWbr2xvMtXddpnkVs8TkSiaLcmpJGY7_hUTa3r_1X1SgDyhng@mail.gmail.com>

```
Thanks a lot!

That solution worked for me:
env TERM=linux setterm -regtabs 4

Best regards,
Alexander Yancharuk
alex@itvault.info <mailto:alex@itvault.info>
On 23.08.2013 22:19, Antoine Pelisse wrote:
> On Fri, Aug 23, 2013 at 7:28 PM, Янчарук Александр <alex@itvault.info> wrote:
>> But those settings seems does not affect on |git add -p|. How to set tab
>> size for hunks in *git add -p* command?
> That's because "git add -p" doesn't go through less/pager.
> You can certainly change the tabs size for your terminal with "tabs -4" though.

```
