[wingide-users] feature suggestion: completion+merging
David Montgomery
davidlmontgomery at gmail.com
Fri Aug 3 15:11:35 MDT 2007
On 8/3/07, Wingware Support <support at wingware.com> wrote:
> I've implemented and telepathically updated your computer with
> this feature. ;-)
>
> Go into preferences under Editor / Autocompletion and change
> the Completion Mode preference to Replace Existing Symbol.
>
> I find it whomps on things more than I like. If you have ideas
> on how to improve it, please let me know.
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
More information about the wingide-users
mailing list