DEV Community

Discussion on: 3 tools to enhance your email workflow

joshzaldana profile image
JZ Author

I haven't used Pug, but interestingly enough shortly after building my workflow I stumbled across an article that highlighted Pug. I take it you use it, Mihail? Similarly to what I asked Michael, what editor are you using?

qm3ster profile image
Mihail Malo

You may have also seen Pug under the name Jade, they rebranded.

I shamefully enough use VS Code for now.

I currently use Pug as the template language inside Vue.js .vue single file component files, which means I basically don't use it for templating - no conditionals, no includes, no iteration, no nothing.

I previously used it with Gulp for static (no-js) site generation.

Apparently it's so popular that now even emmet shortcuts work with it.
Not in Vue files for me, but it's terse enough for that not to matter.
A key part of that is that there are no closing tags, so if you want to swap out or rename a tag/component, you don't have to look for the closing tag. Which also means that the file is almost half the lines, easier to overview.
On the other hand, you do have to be careful with indentation, namely exactly one issue: When you press Enter, at what indentation does your editor place you compared to the last line. -1? 0? +1?

There's an even more extreme language called slm wherein you can drop even more parenthesis (everything is optional but permitted, like in stylus stylesheet language; I'd say slm is to Pug as Sass is to SCSS) but it's not as widespread so doesn't have as much of an ecosystem.

The pug syntax is also very similar to the "concise syntax" available in Marko, ebay's UI library/framework.