Fast/easy method for commenting out code?

Hi. I’m just wondering if Pinegrow has some quick/easy method for commenting out a section of code (like drag selecting a section of code, and hitting some hotkey to automatically place the ‘greater than/less than, exclamation, dash characters at each end of the selection’.

Disabling secctions of code is something I find I do fairly often, using the comment tag, and it is a bit tedious manually typing it out on either side… so that kind of feature would actually be great.

I know that Pinegrow has an eye icon for each element (which is great), but it doesn’t seem to affect previews to a browser/saved pages.

the text editor in PG is fairly simple and does not support this action.

the “eye” things in the DOM tab do not comment out the code like they do in CSS style tab, they only hide it from display in the preview window.

most everyone uses a 3rd party text editor that integrates with PG so you can have the best of both worlds… but screen real estate begins to be scarce before long.

i got myself a 2nd monitor just so i could have the text editor and PG side by side.

Both Atom and VSCode integrate with PG and each are FULLY featured.

Thanks for the reply. Yep, I get how the eye icon works, but was hoping there would be an separate feature where you could easily auto-comment a selection, since typing all the individual components required of a comment tag are a bit cumbersome, and are a perfect candidate for a automated hotkey action. Make a selection, hit a key (or button) and it adds the comment tag around it (and, just as easily, takes it away). That would be really useful for me.

Yup, I have Atom, although I haven’t installed it, as I have been (otherwise) really satisfied with the code editor in Pinegrow, and never (personally) needed an external editor.

I guess I’ll make the suggestion in the Feature Request, and hope for the best. I may install Atom. I see that there’s also the option of Brackets, and initially I wasn’t sure which was the better choice. It seems Brackets is mainly focused on Front-End, whereas Atom apparently is more Back-End… although at my level, they are surely interchangeable.

brackets is a different beast and there’s no plugin for PG… i use it to look at .json files, and that’s about it.

it’s between Atom and VSCode for PG users and we start another flame war over which on is better, that’s always fun.

I chose VSCode because i like the color schemes better :slight_smile:

I’ll be checking out VSCode, as I hadn’t heard of it before this thread. I heard that Atom (although really good) is a bit heavy/bloated, which sucks, considering I’d probably be using 10% of it’s actual features. I’ll have to see how VSCode compares.

I’m perfectly happy with Pinegrow’s editor… aside from there not being an easy way to comment out sections of code.

Just to be sure, you still have to use the < ! - - - - > tags on either side to comment things out these days, right?.. There’s no new method? Can you use double slashes for single lines, or is that just a Javascript thing?

in html, that’s what the editor uses as far as i know… i just hit ctrl-/ and it comments using the appropriate syntax for the file i’m working in, be it html or css (which are different).

VSCode and Atom both take care of all that on their end and if needs augmenting there’s probably a plug in for it. I also found Atom to be bulkier and slower than VSCode and it really did come down to how each handled the little color preview box whenever i use a #fcf color designation… atom was too slow and clunky where VSCode just handled it and didn’t make a fuss about it.

I’m shallow that way.

In the Net Ninja tutorials I have been watching, his editor (Brackets, I think) has a nice hotkey for pretty much all tags… kind of a ‘CTRL+first letter of the tag’ thing which automatically writes the full tag.

I can’t say I’m even sure if Pinegrow has something like that, as I haven’t noticed it. I could live without it, as long as I’d have a hotkey for comments, as I’m often commenting things out for debugging.

I’ll have to play around in Pinegrow, and see what works.