Skip to content

Commit

Permalink
Merge pull request #20 from randy3k/unicode
Browse files Browse the repository at this point in the history
unicode autocomplete
  • Loading branch information
randy3k authored Aug 12, 2016
2 parents d7bb14d + c91402d commit 266fb0d
Show file tree
Hide file tree
Showing 8 changed files with 3,477 additions and 3 deletions.
44 changes: 44 additions & 0 deletions Default.sublime-keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[

{
"keys": ["tab"], "command": "julia_unicode_insert_best_completion", "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.julia" },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true },
{ "key": "has_next_field", "operator": "equal", "operand": false },
{ "key": "julia_unicode_can_complete"},
{ "key": "julia_unicode_is_completed", "operand": false }
]
},

{
"keys": ["tab"], "command": "auto_complete", "context":
[
{ "key": "setting.tab_completion", "operator": "equal", "operand": true },
{ "key": "has_next_field", "operator": "equal", "operand": false },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "selector", "operator": "equal", "operand": "source.julia" },
{ "key": "julia_unicode_is_completed"}
]
},

{
"keys": ["tab"], "command": "julia_unicode_commit_complete", "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.julia" },
{ "key": "auto_complete_visible" },
{ "key": "setting.auto_complete_commit_on_tab" },
{ "key": "julia_unicode_can_complete"}
]
},

{
"keys": ["enter"], "command": "julia_unicode_commit_complete", "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.julia" },
{ "key": "auto_complete_visible" },
{ "key": "setting.auto_complete_commit_on_tab", "operand": false },
{ "key": "julia_unicode_can_complete"}
]
}
]
12 changes: 9 additions & 3 deletions Julia.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// Adhere to to the Julia code formatting guidelines
// https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#code-formatting-guidelines
{
"auto_complete_triggers": [
{
"characters": "\\",
"selector": "source.julia"
}
],
// Adhere to to the Julia code formatting guidelines
// https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#code-formatting-guidelines
"tab_size": 4,
"translate_tabs_to_spaces": true
"translate_tabs_to_spaces": true,
}
2 changes: 2 additions & 0 deletions julia_unicode/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .latex_symbols import latex_symbols
from .emoji_symbols import emoji_symbols
13 changes: 13 additions & 0 deletions julia_unicode/emoji_symbols.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include(joinpath(JULIA_HOME, "..", "share", "julia", "base", "emoji_symbols.jl"));

πŸ“ = open("emoji_symbols.py", "w")

println(πŸ“, "emoji_symbols = [")
for (πŸ“ž, (πŸ”‘, 🍺)) in enumerate(emoji_symbols)
print(πŸ“, "(\"", escape_string(πŸ”‘), "\", u\"", 🍺, "\")")
πŸ“ž < length(emoji_symbols) && print(πŸ“, ",")
println(πŸ“, "")
end
println(πŸ“, "]")

close(πŸ“)
Loading

0 comments on commit 266fb0d

Please sign in to comment.