Reputation: 1560
I am currently visually selecting the code and typing ">" which moves the code by 2 tabs. But I only want to move it by one tab.
Is there any alternate command in VIM to move the code by a tabspace. Ideally I would like to put a marker and then move the whole code block by a tabspace. Thanks
Upvotes: 1
Views: 695
Reputation: 61499
There are easier ways to do what you want, as others have pointed out, but the following is of more general use:
Upvotes: 1
Reputation: 328594
> moves the code by one shiftwidth. So you need to set that option correctly.
Upvotes: 2
Reputation: 12590
This will set your shifting width to four spaces (default tab size):
:set sw=4
You can also change the size of the tab stop itself (X is any value you like):
:set ts=X
And if you like to use spaces instead of tab characters, use this:
:set expandtab
If you use the same settings in many files, you can put these in your .vimrc
.
Upvotes: 3