Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim 7.3 junk text inserted to buffer when using completion (and Vundle) #21

Closed
danthedeckie opened this issue Oct 20, 2012 · 17 comments
Closed

Comments

@danthedeckie
Copy link

Similar to issue #13, but I'm using the latest jedi-vim, and vim 7.3.584, and Vundle rather than Pathogen.

typing:

x = "text"

x.find(

and pressing '' to bring up the omnicompletion results in

x = "text"
       (sub, start=None, end=None)
x.find(

which then gets written on save. When I put the cursor on the line, I get:

x = "text"jedi=0, ≡      (*sub*, start=None, end=None) ≡jedix.find()
@davidhalter
Copy link
Owner

Have you read #19? Please make shure to pull again!

@davidhalter
Copy link
Owner

I pushed the changes to the master branch, now.

@djs
Copy link

djs commented Oct 23, 2012

I created a simple test case where I can reproduce the issue. I did notice that it's not always the same depending on the context. In some cases, it will be left behind after enter. In other cases, I have to go into normal mode.

https://gist.github.com/3936508

My only non-default jedi settings are:
let g:jedi#use_tabs_not_buffers = 0

Also note this is vim 7.3 on Linux with +conceal

@danthedeckie
Copy link
Author

@djs: yep. happens the same for me too, just with ctrl-x, ctrl-o (for omni-completion) rather than ctrl-c.

@davidhalter : I've pulled the latest version, still the same :-/

@danthedeckie
Copy link
Author

I tried removing all other plugins and options from my .vimrc, down to:

set nocompatible
set t_Co=256
filetype off
syntax on

set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

Bundle 'gmarik/vundle'
Bundle 'jedi-vim'

but still I get the same issue.

@davidhalter
Copy link
Owner

Can you disable it with let g:jedi#show_function_definition = "0" until I find a solution?

The feature is nice to have but not too important. I'm currently dealing with other important stuff (@ jedi) and having problems to find enough time besides my studies (at least for the next two weeks).

@djs Thanks for this example. But is it also happening without hitting Ctrl-C? Ctrl-C has a special meaning in VIM.

@danthedeckie
Copy link
Author

@davidhalter : sure. that works. This is a pretty cool plugin, even without show_function_definition. :-) Thanks!

@ugtar
Copy link

ugtar commented Oct 25, 2012

I see this issue as well. How can I help you debug? Is there a simple way to disable all my other vim plugins?

@djs
Copy link

djs commented Oct 26, 2012

@davidhalter I'm using ctrl+C as my escape key. It just seems that certain scenarios make the text remain in the buffer. In other scenarios, it gets erased properly.

@ugtar I don't think it's related to other plugins. But if you want to check, the easiest thing to do if just create a new vimrc and use vundle. I may try to debug this futher this weekend. My python is good, but my vimscript is not so it may take a while to get started.

@haesken
Copy link

haesken commented Oct 27, 2012

@djs : maybe try remapping C-c to Esc?

noremap <C-c> <Esc>

@djs
Copy link

djs commented Nov 5, 2012

@haesken Yes. I've done this now as it seems to not cause any problems. I never realized that meant something different than . It always seems to work okay. But it seems that jedi-vim uses an InsertLeave autocommand to erase the popup. And it seems that there is no way in vim to create such a popup the way omnicomplete does, without actually editing the buffer. So, this bug may be impossible to fix without a change to vim itself...

@davidhalter
Copy link
Owner

@danthedeckie @djs Does using :noremap <C-c> <Esc> solve this for both of you?

I'm thinking about a mapping of C-c to Esc for jedi. Because it's just confusing this way.

@davidhalter
Copy link
Owner

@danthedeckie @djs Is this still an issue? If not or if you don't answer, I'll close this.

@djs
Copy link

djs commented Dec 3, 2012

Yes, it's working for me. I don't think there's any way to fix the Ctrl-C issue, and it turns out I really wanted Esc mapped to it anyway.

@jmistx
Copy link

jmistx commented Dec 14, 2013

I had same issue with junk text, but instead ≡jedi=0, ≡ I get ?jedi=0, ? (if somebody will google it)

Of course problem was with my default file encoding: that was not UTF-8

Also thank you very much for this awesome plugin!

@subsetpark
Copy link

I am getting this issue with

=`=jedi=0, =`=               (*_*arg*_*) =`=jedi=`=

While my encoding is utf-8.

@blueyed
Copy link
Collaborator

blueyed commented Oct 26, 2015

@subsetpark
Seems like the syntax file gets not (correctly) for you, which should setup concealing rules for this. It is meant to look like this (or at least similar), but then gets beautified using Vim's concealing feature.
You might want to search the jedi-vim issues, there was something in this regard already, where some other plugin conflicts with how jedi-vim sets things up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants