Please take a look at
gif - especially at start when you got a hint for
Enum.map/2 which is later changed in example to raw data (list and func). Before that change what you got from hint is:
Enum.map(collection, fun) (those variable names comes from function definition), so you would not change it for example to:
Enum.map(&IO.puts(&1), [1, 2, 3]) by accident (at least not so easy - you need to be really drunk ).
Now let’s assume our macro generated:
MyApp.Queries.get_post_comment(comment_id, post_id). However you have
cid (short for
pid (short for
post_id). As same as in example
collection is changed to
[1, 2] and variable
fun is changed to
&IO.puts(&1) as same you are changing
pid without any typo, because again variables are also in auto completion list.
So as long as you use hints you would write
MyApp.Queries.get_post_comment(cid, pid) rather than
MyApp.Queries.get_post_comment(pid, cid). Hmm …
SublimeText 3 is not my dreamed editor, but with such hints I never made similar typo. Well … in my case it’s also not about editor, but also coding habits … I personally really like to write
long_descriptive_names rather than
ldn (whatever it means).
Hope I described it well. Please let me know if I misunderstand your question. Also sorry for this off-topic.