views:

324

answers:

3

In Vim emulation mode (viper + vimpulse) << and >> are working similarly to Vim's. I would just like them to indent with 2 spaces. How do I do that? (I know, trivial. But useful)

A: 

I'm guessing that mode probably uses Emacs' tab-width or c-basic-offset settings. Both can be set with:

(setq tab-width 4)
(setq c-basic-offset 4)

(Of course, use whatever size you want in place of 4.)

mipadi
A: 

In order to have space and not tab, add this to your .emacs :

(setq-default indent-tabs-mode nil)

To have Emacs indent with 2 spaces, do like mipadi told you, but I would use default-tab-width

(setq default-tab-width 2)
p4bl0
A: 

After reading viper-cmd.el code (and testing), I determined that correct answer is:

(setq viper-shift-width 2)
phjr