digitalmars.D - Diet template syntax highlighting / alternatives?
- Foo Bar (11/11) Mar 14 2019 While I've always been a big fan of vibe.d, diet templates have
- Johannes Loher (12/24) Mar 15 2019 I don't really think there is a real alternative at the moment if you
- =?UTF-8?Q?S=c3=b6nke_Ludwig?= (7/19) Mar 15 2019 Have a look at https://code.dlang.org/packages/vayne
- rjframe (5/8) Mar 20 2019 Any pug syntax highlighter will work for diet; e.g.,
While I've always been a big fan of vibe.d, diet templates have never really tickled my pickle. I don't like how much different it is from plain HTML, and I always prefer something like EJS (https://ejs.co). I was hoping that there was some sort of alternative to diet templates, something with more similar syntax to EJS. Are there any such alternatives? If there are no alternatives, are there any sort of syntax highlighting plugins for vim that support diet? That would at least make diet a little easier to work with. Thanks!
Mar 14 2019
Am 14.03.19 um 23:22 schrieb Foo Bar:While I've always been a big fan of vibe.d, diet templates have never really tickled my pickle. I don't like how much different it is from plain HTML, and I always prefer something like EJS (https://ejs.co). I was hoping that there was some sort of alternative to diet templates, something with more similar syntax to EJS. Are there any such alternatives? If there are no alternatives, are there any sort of syntax highlighting plugins for vim that support diet? That would at least make diet a little easier to work with. Thanks!I don't really think there is a real alternative at the moment if you plan to only use D. Some other frameworks use a different template syntax, e.g. Diamond MVC , which builds on top of vibe.d (https://github.com/DiamondMVC/Diamond) or hunt-framework, which is completely independent and developed by the Chinese community (https://github.com/huntlabs/hunt-framework). If you want to stick with "plain" vibe.d, but simply want syntax highlighting for diet templates, I suggest to use Laurent Treguier's extension for VS Code (https://github.com/LaurentTreguier/diet-vscode). In my experience, it worked really well.
Mar 15 2019
Am 14.03.2019 um 23:22 schrieb Foo Bar:While I've always been a big fan of vibe.d, diet templates have never really tickled my pickle. I don't like how much different it is from plain HTML, and I always prefer something like EJS (https://ejs.co). I was hoping that there was some sort of alternative to diet templates, something with more similar syntax to EJS. Are there any such alternatives? If there are no alternatives, are there any sort of syntax highlighting plugins for vim that support diet? That would at least make diet a little easier to work with. Thanks!Have a look at https://code.dlang.org/packages/vayne I haven't used it myself, but I would guess that this is currently the best supported alternative. There are also some similar approaches: https://code.dlang.org/packages/mustache-d https://code.dlang.org/packages/temple The latter is probably closest to EJS, syntax-wise.
Mar 15 2019
On Thu, 14 Mar 2019 22:22:33 +0000, Foo Bar wrote:If there are no alternatives, are there any sort of syntax highlighting plugins for vim that support diet? That would at least make diet a little easier to work with.Any pug syntax highlighter will work for diet; e.g., https://github.com/digitaltoad/vim-pug ftdetect: autocmd BufRead,BufNewFile *.pug,*.jade,*.diet set filetype=pug --Ryan
Mar 20 2019