vim The dot operator Set indent

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

This is very useful when setting indent of your code

if condition1
if condition2
# some commands here
endif
endif

move your cursor to the 2nd line, then >>, the code will indent to right.

Now you can repeat your action by continue to 3rd line, then hit . twice, the result will be

if condition1
    if condition2
        # some commands here
endif
endif


Got any vim Question?