Re: [code] Feature request: snippet._insert should allow replacing the selection

From: Pedro Andres Aranda Gutierrez <paaguti.att.gmail.com>
Date: Sun, 2 Apr 2017 18:14:35 +0200

PD, line 7 is also wrong!

On 2 April 2017 at 18:12, Pedro Andres Aranda Gutierrez <paaguti.att.gmail.com>
wrote:

> Hi Mitchell
>
> lots of confusion with the snippets and %<selected_text>. I think have
> figured out what puzzles me (see attached screenshot to follow).
>
> So left is the ini.file right is a text file. Lines 1, 2, 3 and 10 are
> what happens if I apply any of the snippets to a line that is completely
> selected: selected text is kept and result of snippet is appended at end
> of line. This behaviour is unexpected and cause of my woes.
>
> Lines 4,5,6 and 7 are the correct behaviour of the first snippet and that
> only happens when we select a line partially (a word, or a couple of words
> from a line.
>
> Textadept 9.3 on OSX (stock version)
>
> Best, /PA
> [image: Inline images 1]
>
> On 2 April 2017 at 17:36, Mitchell <m.att.foicica.com> wrote:
>
>> Hi Pedro,
>>
>> On Sun, 2 Apr 2017, Pedro Andres Aranda Gutierrez wrote:
>>
>> Hi folks,
>>>
>>> don't know if this is too difficult, but I think it is somehow not a
>>> moonshot. If I have a snippet like
>>> '\\%1(ac){%<selected_text>%2}%0'
>>> in a LaTEX mode, what I'm actually intending is to insert an acronym or
>>> convert the selected text into a new acronym. Converting IMHO means
>>> replacing the selection with the text resulting from applying the
>>> snippet...
>>>
>>
>> Would you please give an example of input and then an example of the
>> expected output? I cannot visualize what you are suggesting. Thank you.
>>
>> Cheers,
>> Mitchell
>> --
>> You are subscribed to code.att.foicica.com.
>> To change subscription settings, send an e-mail to code+help.att.foicica.com.
>> To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
>>
>>
>
>
> --
> Fragen sind nicht da um beantwortet zu werden,
> Fragen sind da um gestellet zu werden
> Georg Kreisler
>

-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellet zu werden
Georg Kreisler

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
imagen.png
Received on Sun 02 Apr 2017 - 12:14:35 EDT

This archive was generated by hypermail 2.2.0 : Mon 03 Apr 2017 - 06:26:15 EDT