[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to change indent in vim



On Jun 10, Thomas H. George <lists@tomgeorge.info> wrote:
> I want indent set to 3, the default setting 8 uses up too much space.

Ben Olive <ben.olive@gatech.edu> suggest:
> set tabstop=3
> set shiftwidth=3

Actually, you should really consider leaving the tabstop alone. Tabs
are every 8 characters, and if no-one ever fiddled with that it would
be simple. (Yes, I know people aren't simple. But sometimes simple really
is easiest. Sigh.)

Once you've agreed with that philosophy, change your indentation to 3
(shiftwidth=3 or sw=3) and use Ctrl/T instead of Tab for indents. Use
Ctrl/D for outdents. Use >> and << (possibly with a range) to shuffle
a line (or range of lines) leftwards and rightwards.

I'll even give you bonus points for remapping Ctrl/T to Tab in insert
mode.

Chris


Reply to: