(or emacs irrelevant)

Introducing Swiper

I like the idea of helm-swoop, but it somehow has minor annoyances that stop me from using it, like automatic helm-input, and especially the circular candidates. Or maybe it's just NIH talking. Anyway, I'm rolling my own, and it's called swiper.


Swiper in action

Here's how it looks like:


As you can see, the search string "dec fun pro" is transformed into a regex "\\(dec\\).*\\(fun\\).*\\(pro\\)", and each group in the matches is highlighted with a different face. This is quite similar to the way re-builder does it. In fact it's possible to use swiper as a poor man's re-builder (since it matches only single lines).

I'm doing my own matching this time, as the part-swapping behavior of helm-match-plugin is more annoying than useful.

Also note that:

  • The whole *swiper* buffer is fully syntax highlighted.
  • The appropriate parts of the matches are highlighted as well.

Swiper in a dired buffer

Here's another screenshot:


It appears that helm is ignoring the display of file attributes, since they have a sort of invisible property set. I kind of like this behavior.

See how the faces are recycled

I've defined only 4 faces currently (foxes aren't unicorns, the palette is quite limited), so they loop about if you have many groups:


Yup, the technology is there. Although a powerline theme for the helm mode line is still missing.