Sublime Text

Add keyboard shortcut/key binding

Preferences -> Key Bindings -> User

[
	{ "keys": ["ctrl+alt+s"], "command": "tag_remove_picked_in_selection" }
]

The command, part of the Tag plugin was found in ~/.config/sublime-text-2/Packages/Tag/Tag Remove/Commands.sublime-commands (on Linux Ubuntu):

[
  {
    "caption": "Tag: Remove Picked Tags in Selection",
    "command": "tag_remove_picked_in_selection"
  },
  {
    "caption": "Tag: Remove Picked Tags in Document",
    "command": "tag_remove_picked_in_document"
  },
  {
    "caption": "Tag: Remove All Tags in Selection",
    "command": "tag_remove_all_in_selection"
  },
  {
    "caption": "Tag: Remove All Tags in Document",
    "command": "tag_remove_all_in_document"
  }
]

Add Snippet

  • Tools -> New Snippet... -> save as drupal_t.sublime-snippet in Packages/User
<snippet>
    <content><![CDATA[<?=t('$SELECTION$1');?>]]></content>
    <!-- Optional: Tab trigger to activate the snippet -->
    <tabTrigger>t</tabTrigger>
    <!-- Optional: Description to show in the menu -->
    <description>Drupal t() Snippet</description>
</snippet>
  • Preferences -> Key Bindings - User
[
  { "keys": ["ctrl+t"], "command": "insert_snippet", "args": { "name": "Packages/User/drupal_t.sublime-snippet" } }
]

Feedback