<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thanks you a lot, finally I just used the wordCharacters trick, which is far more logical !<div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">Le 11 juil. 2016 à 15:29, Allan Odgaard <<a href="mailto:mailinglist@textmate.org" class="">mailinglist@textmate.org</a>> a écrit :</div><br class="Apple-interchange-newline"><div class="">


<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" class="">

<div class="">
<div style="font-family:sans-serif" class=""><div style="white-space:normal" class=""><p dir="auto" class="">On 10 Jul 2016, at 13:53, Louis Abraham wrote:</p><div class=""><br class="webkit-block-placeholder"></div></div>
<div style="white-space:pre-wrap" class=""><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px" class=""><div dir="auto" class="">If I type :
</div><div dir="auto" class="">(define ab-cd€ 23)
</div><div dir="auto" class="">ab
</div><div dir="auto" class="">And press [esc], then the whole name appears. Nevertheless, if I try with ab-, then the completion doesn't trigger. So far I experienced, I works only after alphanumeric characters.
</div><div dir="auto" class="">
</div><div dir="auto" class="">Thus, there are two strange behaviours :
</div><div dir="auto" class="">
</div><div dir="auto" class="">1. The entity scopes don't seem to affect autocompletion. Then, what is the recommended manner to solve my main issue ? Can I capture the function name in both selectors (entity and variable) ?
</div></blockquote></div>
<div style="white-space:normal" class=""><p dir="auto" class="">What you can do is set a characterClass for the entity scope.</p><p dir="auto" class="">For example in the bundle editor create a new settings item and make the scope selector be <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">entity.name.function.scheme</code> and the actual value something like: <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">{ characterClass = 'variable'; }</code>.</p><p dir="auto" class="">Now TextMate will treat all contiguous characters matched as <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">entity.name.function.scheme</code> as a single word for the purpose of word selection, completion, etc.</p><div class=""><br class="webkit-block-placeholder"></div></div>
<div style="white-space:pre-wrap" class=""><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px" class=""><div dir="auto" class="">2. Why can't the autocompletion be triggered after a non alphanumeric character ?
</div></blockquote></div>
<div style="white-space:normal" class=""><p dir="auto" class="">This is because TextMate only completes “words”, however, as you can define what constitute a word, you can include the dash.</p><p dir="auto" class="">For example if you do the above setting then escape will complete <em class="">if</em> the dash is used in a place where it is matched as <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">entity.name.function.scheme</code>.</p><p dir="auto" class="">There is also the ability to simply make the dash a word character for the <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">source.scheme</code> scope, this would also be done by a bundle setting but one that is scoped to <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">source.scheme</code> and contains <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">{ wordCharacters = '-'; }</code>.</p>
</div>
</div>
</div>

<br class="">_______________________________________________<br class="">textmate mailing list<br class=""><a href="mailto:textmate@lists.macromates.com" class="">textmate@lists.macromates.com</a><br class=""><a href="http://lists.macromates.com/listinfo/textmate" class="">http://lists.macromates.com/listinfo/textmate</a></div></blockquote></div><br class=""></div></body></html>