Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard shortcut to comment line #248

Closed
AgDude opened this issue Dec 15, 2012 · 10 comments
Closed

Keyboard shortcut to comment line #248

AgDude opened this issue Dec 15, 2012 · 10 comments
Assignees

Comments

@AgDude
Copy link

AgDude commented Dec 15, 2012

A keyboard shortcut to 'comment' selected lines would be a very useful feature. My suggestion is cntrl+/.

@oskarkrawczyk
Copy link
Member

Too difficult to implement and keep a track of the comment<->line relation.

Maybe sometime in the distant future.

Definitely not for this or the next major iteration of jsFiddle.

@AgDude
Copy link
Author

AgDude commented Dec 15, 2012

I am not sure you need to keep track of the "relation." What if it worked something like: if the first two non-whitespace characters are '//' remove them, otherwise, add them?

Perhaps it's not that simple.

Thanks for the great work you have done.

@oskarkrawczyk
Copy link
Member

Ok, I totally misunderstood what you were requesting.

We're updating the editor to a new version, so adding a keyboard shortcut to comment out some lines of code should not be a problem.

@oskarkrawczyk oskarkrawczyk reopened this Dec 15, 2012
@ghost ghost assigned oskarkrawczyk Dec 15, 2012
@oskarkrawczyk
Copy link
Member

This is working partially at http://alpha.jsfiddle.net

CMD+/ comments out the selection - unfortunately for now it tries to use HTML comments for all panels, including JS and CSS.

@yusafkhaliq
Copy link

This works however my browser also zooms in, kinda irritating, but really cool feature otherwise :)

@oskarkrawczyk
Copy link
Member

CMD and / zooms in on your browsers? Odd choice of a shortcut.

@yusafkhaliq
Copy link

ohhhh 👍 :p i was copying what you literally commented as in "CMD + / rather than "CMD /" SORRY guys

@yusafkhaliq
Copy link

one more thing "CTRL + S" isn't actually updating however opening save as dialog, an this is when the javascript/HTML/CSS boxes are focused

@oskarkrawczyk
Copy link
Member

@yusafkhaliq was never updating anything. See bottom left in jsfiddle.net for available shortcuts.

@thetroublemaker
Copy link

This is great however the shortcut creates an HTML comment, any chance of doing the same of the JS block?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants