Maybe something like this?
```scss
$tabs: (write, pencil),
       (preview, eye);

@each $name, $icon in $tabs {
  ##{$name}-tab {
    background: image-url('i/#{$icon}.png') 0 0 no-repeat;
  }
  li.active, li:hover {
    ##{$name}-tab {
      background: image-url('i/#{$icon}.png') 0 0 no-repeat;
    }
  }
}
```