Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Alonso Serrano
Alonso Serrano
15,341 Points

Is there a shortcut in Atom for wrapping selected text with quotes?

I love the cmd + / shortcut to comment things out. Is there something similar but for turning things into strings?

I know Atom is "hackable". How would you go about adding this?

Thanks!

Hitting the quotes while text is highlighted works in a lot of good editors. Atom, Sublime, Brackets, Not notepad + though . Well it kinda works in notepad+, it's really convoluted though.

:D

1 Answer

Why, yes there is! Highlight the string by double clicking it, then hit the quotes. It will wrap the string in "" or '' whatever you chose. To highlight a whole line instead of one word, you can

  • double click and then click again, it will highlight that line, or
  • click the beginning of where you want to start, hold shift and then click where you want to end.
  • Hit the quotes. It will wrap the highlighted area with the quotes
  • I use it all the time, it's very handy :D
  • it also works for wrapping things in parenthesis, curly braces and brackets
Alonso Serrano
Alonso Serrano
15,341 Points

YES! This is amazing! So useful! Thanks a lot!

Mike Hickman
Mike Hickman
19,817 Points

Holy crap. I know and use a ton of shortcuts, but never knew this. WHY DID I NOT KNOW THIS?! Thanks for the great answer.