Home Download Buy Blog Forum Support

Keymap to Remove HTML Comment

Keymap to Remove HTML Comment

Postby sublime_user on Wed Aug 31, 2011 11:57 pm

Hi, I'd like to set up a keymap to remove HTML comments. Is this possible?

So if I have

<!-- hey there -->

and I press CTRL+SHIFT+M

Then I get this

hey there
sublime_user
 
Posts: 13
Joined: Wed Aug 03, 2011 9:17 pm

Re: Keymap to Remove HTML Comment

Postby skaet on Thu Sep 01, 2011 2:11 am

This command already exists and is bound to ctrl+/, while ctrl+shift+/ will insert a comment at the caret.

If this keymap isn't suitable, you can add the following commands to your Preferences -> Key Bindings - User file:

{ "keys": ["ctrl+m"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+m"], "command": "toggle_comment", "args": { "block": true } }

ctrl+m and ctrl+shift+m are currently bound to existing commands so you'll have to change the keys value to a mapping of your choice.
skaet
 
Posts: 93
Joined: Thu Sep 16, 2010 3:37 pm

Re: Keymap to Remove HTML Comment

Postby sublime_user on Thu Sep 01, 2011 4:32 am

Thanks, that did the trick.
sublime_user
 
Posts: 13
Joined: Wed Aug 03, 2011 9:17 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 16 guests