What are Hugo developers using for development?

Being new to Go I’d like a little assistance when I blunder. I’m getting deeper into working with the golang in partials and shortcodes - files that typically have .html extensions. I’m looking for suggestions on IDEs or extensions for editors that others are using to make that part of hugo easier. Tips appreciated, including pointers to previous discussions that searches on “editing partial ide” have not turned up.

I should mention I’m not looking for content creation helpers, like those mentioned https://gohugo.io/tools/editors/ but more the code aspects.

For Go, I use LiteIDE. Not as feature rich as some others, but it is so fast everything else seems slow.

But I notice now you talk about Go templates. I prefer SublimeText for Hugo projects. There are some Go template/Hugo plugins/snippets around.

I use the Atom editor with the Language Hugo package for syntax highlighting and some completion snippets: https://atom.io/packages/language-hugo

3 Likes

To add to the variety, Emacs (web-mode for Go templates, HTML, CSS, … ) + Org mode for the site content files.

1 Like

Another vote for sublime text. Though I have been getting into neovim for remote file editing.

Atom and Visual Studio Code are all the rage and free, both seem bloated and slow to me, but then I use old-ish hardware…

Not sure if Sublime has changed since I last used it (v2 I think). But not only was it not really free but it got very slow with a few plugins installed. Those were the reasons I switched to ATOM and then to VSCode. I think that Sublime is Python based as well so slightly less suited to my normal workflows. BTW, I am not a developer as such. I mainly code for fun these days though I occasionally code professionally for transforming awkward or dirty datasets if I can’t find anyone else to do it for me.

I have used VScode for a year or so now as most of my coding is JavaScript/Node.JS and VSC is built in Electron (Node.JS). It is the best IDE I’ve ever used for that purpose. Can’t comment on whether it is any good for Golang though I’m afraid.

Of course, all of these tools tend to have slower start-up because of their feature sets, especially with any number of extensions installed. So I still use the venerable Notepad++ when I want to do something quick and one-off. It also has about the best search & replace feature set of anything I’ve used.

No doubt EMACS or VIM and the like are amazing if you are a full-time developer with a more agile brain that mine! But they’ve not done anything for me in the last 20 years :wink:

I’m using PHPStorm by JetBrains for this task. Very nice IDE, but it comes with a yearly cost. The only downside is that the GoLang Templates aren’t recognized within the HTML so it kind of ruins my formatting every time I paste a block, but that is easy to fix.

@internetfreak JetBrains has GoLand as well. https://www.jetbrains.com/go/?fromMenu

I don’t program in go itself but for my front end stuff I used BBEdit for a long while but, it’s not so friendly for markdown use, and although it’s powerful, it’s a bit of an odd duck. I have a license for Sublime Text 3 as well, so I have been using that, and liking it. I use vim pretty frequently too.

Edit: used Atom for a while a few years ago too. It’s slow, and really bogged down when opening a large file. Both Sublime 3 and BBEdit are fast even with large files.

VS Code. Changed from Sublime Text a few months ago. Like VS Code better. But it’s individual.

@RickCogley BBEdit: you’re dating yourself! A great editor, though I haven’t used it for years. Atom isn’t the fastest, but I’m somehow stuck on it. Its git integration is great and helps me make better commits.

2 Likes

puts on reading glasses :wink:

I know, right!? BBEdit finally went 64-bit a few months ago. It has good features but, it does not do very well when processing Japanese text (specifically re wrapping, say in a markdown post), whereas Sublime Text 3 does a good job.

1 Like

I gave VScode another shot last week and have barely opened Sublime Text since! It seems a bit more slick now.
The thing that’s really sold me on it this time is the magic around Extensions, the fact that it says ‘hey you’re editing X shall I install this handy extension Y’ as soon as you open a document really speeds getting setup. With other editors you have to go hunt around and find extensions to install.

Probably only the second Microsoft product I’ve liked ever :wink:

(Switched from Mac OS to Linux this year and so have finally left BBEdit behind too. The only thing I missed was the file comparison and Meld does a good job of that.)

3 Likes

You might like: https://marketplace.visualstudio.com/items?itemName=budparr.language-hugo-vscode

5 Likes