Skip to content

Commit

Permalink
Let Insert Entity… show entities sorted
Browse files Browse the repository at this point in the history
This improves type-to-select slightly.
  • Loading branch information
sorbits committed Jul 26, 2013
1 parent d7651c7 commit 123a6c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Commands/Insert Entity….plist
Expand Up @@ -15,6 +15,8 @@ File.read("#{ENV['TM_BUNDLE_SUPPORT']}/entities.txt").scan(/^(\d+)\t(.+)$/) do |
entities << { 'display' => "#{value} (#{char})", 'char' => char, 'entity' => value }
end
entities.sort! { |lhs, rhs| lhs['display'].downcase <=> rhs['display'].downcase }
plist = { 'entities' => entities, 'insertAsEntity' => true }.to_plist
open('|"$DIALOG" -cm "Insert Entity"', 'w+') do |io|
io << plist; io.close_write
Expand Down

0 comments on commit 123a6c7

Please sign in to comment.