To indent HAML code I usually add or delete 2 spaces. Adding I do:
That's it 2 spaces are added. However to remove the spaces, I't does not work, for example doing:
This just does not work, other lines spaces are not deleted. How then can I do this ?
Here is an example code:
.module_1
.pricing_details
%h2
Save
The idea is moving everything so it matches 2 space in respecto .module_1 as:
.module_1
.pricing_details
%h2
Save
The propose solution using < > works only for indenting now I'd like to for example:
.module_1
.pricing_details
%h2
Save
move the above to:
.module_1
.pricing_details
%h2
Save
Try < and > commands. You will need :set shiftwidth=2
for them to work in this way.
UPDATE
Considering your last example, changing
.module_1
.pricing_details
%h2
Save
to ⇓
.module_1
.pricing_details
%h2
Save
can be accomplished with moving to .pricing_details
line and hitting Vjj<
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With