Thursday, January 10, 2013

Re: Indenting Problem

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 01/10/2013 03:32 PM, Adolfo Olivera wrote:
> Hi, I'm trying to indent several lines at the same time in visual
> mode with "*>*". Problem is not respecting the *set ts=2* that I
> have on my *.vimrc* file. How can I make it to indent just two
> spaces?
>
When using the > command vim uses the value from the shiftwidth option.
So if you set the shiftwidth to 2 it should work.
If I understood correctly, You can also set smarttab (:help
'smarttab') and then Vim should use the value from ts (or softtabstop)
when using the > command.

Personally I find this one of more confusing parts of Vim and have
always just set 'shiftwidth', 'tabstop' and 'softtabstop' to the same
value and further ignored the problem. It was only yesterday that i
watched this excellent Vimcast which explains everything:
http://vimcasts.org/episodes/tabs-and-spaces/

Hope this helps,
Jeroen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAEBCAAGBQJQ7tOaAAoJEBrqc/v4ufiM2CUQAOSe7LQi6IVPS6BD4+yqCn0v
fwFYlQZpW8nDThTVXP4wK8gnK10MBtLdRyNoFOeCzE4UI4LYlkPtXT0Nrp2q/Nss
6NNq6A09AJCrRhslF9WQWVqkWwayKWrT9Us4CSMmZxk7cnfNOVNLrGiLX/yYJMR9
CbwxVJ6mRRWQt2mn+kdt31OViRxwIbPIx6+FIk17bAJXNHOfnqSCF4vcmuHyBONX
7jB3qwmKLmbOivBGlcnDb690OFTv1vNc34yhrB4ZPA50TXPW2U/mvXEr6fpBfKup
T3HpaF9iAiLtLhzNr39OVyBTj0Q1W8NDnqEIrFuROZSpHkMyJLItvfzrR0OWqQLG
dfV6uBwcsrcuZmuhnyMUx4j85suVc9C9EiqcTAEPyXVmIooUV91Q6iPoHDTApwlk
DaaVLZ2qjLbWya7HjnxmQ/LHgwNcAlIUgfgYsqK75Ai8AhZCl6fdh7cMwPYZuoZ3
9iOubQgjqmBQ1Uw7F87JtOXcrT4eBPnqZ3HgEJUSxW0gwf/C0l4itWLmvI1WGoge
5FOna9qAp+WsvgQhP2q/ld1Uo6WGddu0qupgvDNN6oI3q85lB9qSbgKUHj7Chasn
Ik/n6AUxzAPtO+Q/jlX5dlJSN6cfAZuLwZmCURF0KxzITNaICsenquG1JsiPvOsX
KLaSWPoITMBRYmSDB178
=6lWP
-----END PGP SIGNATURE-----

--
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

No comments: