简体   繁体   中英

how can i create a short cut for auto-format tags on document in sublime plugin 'tag'?

I want to create a short cut for 'Auto-Format Tags on Document' in Sublime plugin 'Tag' and it works when i choose this function from Edit -> Tag -> Auto-Format Tags on Document .

However i add this code in keybindings

 { "keys": [ "command+alt+s" ], "command": "Auto-Format Tags on Document" }

It didn't work and this combination shortcut keys is available.

Could someone help me?

On mac you need to refer about key as super in your keybinding file.

And then if you look in your Key Binding - Default file you will see this combo is already taken :

{ "keys": ["super+alt+s"], "command": "save_all" },

You need to change this value in your Keys Binding - User file if you do not wants to lose this shortcut :D

All documentation is available on sublimetext website as unofficial doc : go to keybinding documentation .

Modifiers

  • shift
  • ctrl
  • alt
  • super (Windows key, Command key...)

Should resolve your problem :)

For windows user : {"keys": ["f7"], "command": "tag_indent_document"},

and it's obvious you can use your own key combination instead of f7 ;)

Docs available here:

Extra: if you searching online tool to check unclose html tags

Check this awesome site

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM