mirror of
https://github.com/joaotavora/yasnippet.git
synced 2026-02-05 15:02:26 +00:00
* Small change to textmate_import.rb to import (commented) "scope" directive
* Reimported the HTML and Ruby bundle with the previous fix * Applied Rob Christie's patches of issues 109 and 110 0001-Deleted-because-this-is-supported-via-dwim-with-rcod.patch 0002-Updated-snippets.patch 0003-Added-setup.el-file-that-must-be-loaded-prior-to-loa.patch 0004-ruby-mode-class-and-module-snippets-updated.patch 0005-changes-to-counting-snippets-and-some-declaration-sn.patch patching some things manually. Thanks a lot Rob!
This commit is contained in:
@@ -136,6 +136,10 @@ class TmSnippet
|
||||
@snippet["content"]
|
||||
end
|
||||
|
||||
def scope
|
||||
@snippet["scope"]
|
||||
end
|
||||
|
||||
def to_yasnippet
|
||||
doc = "# -*- mode: snippet -*-\n"
|
||||
doc << "# key: #{self.tab_trigger}\n" if self.tab_trigger
|
||||
@@ -145,6 +149,10 @@ class TmSnippet
|
||||
doc << "#" unless Choice.choices.convert_bindings
|
||||
doc << "# binding: \"#{self.key_equivalent}\"\n"
|
||||
end
|
||||
if self.scope
|
||||
doc << "#"
|
||||
doc << "# condition: \"#{self.scope}\"\n"
|
||||
end
|
||||
doc << "# --\n"
|
||||
@@known_substitutions.each {|level| level.each_pair { |k, v| self.content.gsub!(k,v) }}
|
||||
doc << "#{self.content}"
|
||||
|
||||
Reference in New Issue
Block a user