Skip to content

Conversation

blueyed
Copy link
Collaborator

@blueyed blueyed commented Jul 28, 2018

Fixes #506

inoremap <silent> <buffer> . .<C-R>=jedi#complete_string(1)<CR>
function! s:complete_on_dot() abort
" Do not trigger completion if there is a dot before already.
if getline('.')[-2:-2] ==# '.'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems weird, but it is likely the best in Vimscript?!

Copy link
Owner

@davidhalter davidhalter Jul 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just not working if you're not editing at the end. We probably need to also use the cursor position.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, good catch.. :)

@davidhalter
Copy link
Owner

What do you think about this change? I personally feel like it's obsolete. We used to have weird issues when using multiple dots. But since Jedi got its shit together about this, I think it's pretty much fine. It obviously still tries to do an autocompletion (I still get a -- Omni completion (^O^N^P) Pattern not found), but that's fine IMO.

However if you like this change, I'm happy to merge it. Sorry for keeping it open for so long, we really could have merged it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

... should not auto-start completion

2 participants