Re: [code] [textadept] automatically fill the Find field with selected text for Ctrl-F

From: Mitchell <m.att.foicica.com>
Date: Wed, 4 Nov 2015 09:16:04 -0500 (EST)

Hi David,

On Wed, 4 Nov 2015, Ziegenlippe wrote:

> it works great.
> but still its an additional feature. wouldn't it be possible to auto-fill the
> Find field?

You could rebind the keybinding for find with something like this in your
~/.textadept/init.lua:

   keys.cf = function()
     local s = buffer:word_start_position(buffer.current_pos, true)
     local e = buffer:word_end_position(buffer.current_pos, true)
     ui.find.find_entry_text = buffer:text_range(s, e)
     ui.find.focus()
   end

That will auto-populate the find entry.

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.
Received on Wed 04 Nov 2015 - 09:16:04 EST

This archive was generated by hypermail 2.2.0 : Thu 05 Nov 2015 - 06:48:16 EST