Permalink
Browse files

allows $ anywhere in completion, adds modified word_separators for Ja…

…vaScript mode
  • Loading branch information...
1 parent cea93e3 commit 51d24eded8a81968c4dc124a3d6a1515fbb9a3f1 @subhaze subhaze committed with marijnh Apr 29, 2013
Showing with 6 additions and 1 deletion.
  1. +4 −0 JavaScript.sublime-settings
  2. +2 −1 tern.py
@@ -0,0 +1,4 @@
+{
+ // Characters that are considered to separate words
+ "word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
+}
View
@@ -299,7 +299,8 @@ def ensure_completions_cached(pfile, view):
completions = []
for rec in data["completions"]:
- completions.append((rec.get("name") + completion_icon(rec.get("type", None)), rec.get("name")))
+ rec_name = re.escape(rec.get('name'))
+ completions.append((rec.get("name") + completion_icon(rec.get("type", None)), rec_name))
pfile.cached_completions = (data["start"], view.substr(sublime.Region(data["start"], pos)), completions)
return (completions, True)

0 comments on commit 51d24ed

Please sign in to comment.