[wingide-users] feature suggestion: completion+merging
Tim Mitchell
t.mitchell at aranz.com
Sun Aug 5 15:00:50 MDT 2007
I use the 'replace existing symbol' mode and sometimes find that it
clobbers to much sometimes. Thinking about though it's usually when I
don't want to replace the existing symbol. Thus another solution could
be to have 2 keybindings for selecting an autocompletion: Tab to select
the symbol using the completion mode selected in the preferences
(replace symbol), and Shift-Tab (or something) to select the symbol
using the other mode (insert).
What do others think
Cheers
Tim
David Montgomery wrote:
> OK, I've been playing with this, and I agree, it overwrites too much.
>
> For example, I was just wrapping a call like this:
> x = obj.function(1, 2, 3)
> to become this:
> x = wrapper(obj.function(1, 2, 3))
>
> My cursor was before obj. I typed 'w' for wrapper and then
> autocompleted, which overwrote obj to give:
> x = wrapper.function(1,2,3)
>
> For this case, what I would want is to have:
> x = wrapper|obj.function(1,2,3)
> where '|' indicates the cursor, and I just need to enter the parens.
>
> More generally, what I'm thinking of is
>
> if replace_existing_symbol_is_set and \
> text_about_to_be_inserted.endswith(text_after_cursor_til_word_end):
> delete_text_after_cursor_til_word_end()
> insert_text_about_to_be_inserted()
> else:
> insert_text_about_to_be_inserted()
>
> David
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
>
--
Tim Mitchell
Software Engineer
Applied Research Associates (NZ) Ltd. (www.aranz.com)
Ph: +64 (3) 374-6120 ext: 203
Fax: +64 (3) 374-6130
Skype: tim-mitchell
More information about the wingide-users
mailing list