From time to time I have to work with code that isn't indented to the level of indentation I have Vim set up to (4 spaces per level), usually after copy/pasting something in the file. I usually make do with
>>. The problem is they don't jump to the next indentation level, they just add or subtract 4 spaces.
If I have code like this
do that will result in
I want it to go to this
Beside easily matching the indentation of the line above, I want it to jump to the next level of indentation, not add 4 spaces.
This is what I have in my .vimrc regarding indentation
:set tabstop=4 shiftwidth=4 expandtab