Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upfixed auto insert for rope complete #984
Conversation
|
@zcodes is it going to keep the current behavior? Can you add some docs about it (or point me to the docs that state that this is the expected behavior), please? =) |
|
@diraol the docs in vim is e.g. if the but if i think here should following the vim api and respecting the user's configuration. |
|
Hi @zcodes, thanks for the explanation, I completely agree with you! I have only one more concern. This will change python-mode behavior, right? So, It would be nice to:
Oh, just one more thing (this is a stylish thing from my side). Can we avoid "anonying" word in the commit message? ;) |
For details, see `:h completeopt` in vim. vim has many flags of option &completeopt, the flags like menu, menuone, noinsert, noselect and so on control the autocomplete behaviour. e.g. if the set completeopt=menu, and there's only one possible completions, the vim will not popup a menu and just insert the completions, this like auto insert __init__ describe above, user there's no chance to confirm the completions they want or not. but if set completeopt=menuone,noinsert, vim will popup menu also when there is only one match. for case above, vim will popup a menu with one completion item __init__ and let user choose insert it or escape, if add noselect with &completeopt, vim will even not selected the first completion item.
|
@diraol I rewrite the commit message, but I have no idea how to change the python-mode doc, can you help ? |
|
Just perfect @zcodes ! Thank you very much! =) Do you want to add yourself to the AUTHORS list in this PR? |
|
@diraol Thanks, but it doesn't matter. |
when define simple class like:
it will auto insert first complete item and
__init__will insert here. this is annoying for i just want codeself.name.the complete behaviour should respect the user's config of vim option &completeopt. In vim's docs, &completeopt has 'noselect' and 'noinsert' option, so it should worked here.
this pr related to #689 #782