Question

I'm using gEdit to edit haml files and the auto indenting feature seems to work when i'm writing one line after another, but when I go and clear out a exisiting element (a div or a class) the rest of the code below doesn't adjust itself. Suppose this is my code

.rightside
  .container
    %ul
      %li hello
      %li world

Now is there any way (using some plugin) through which when I delete .rightside, the rest of the code moves to left by two spaces? I now have to manually erase the space on every line. Thanks for your input.

Was it helpful?

Solution

You can select the block underneath the tag in question and use Shift-Tab or Ctrl-Shift-T to un-indent the text, assuming you have gedit set to use 2 spaces for tabs.

I have also installed the multi-edit plugin. This gives me multiple carets at which points any edits i make will be duplicated. In this case, I can just position the cursor at the top of that block, use the Ctrl-PgDown key shortcut to select the whole block, and then hit delete a couple times.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top