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

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

Comments

Projects
None yet
8 participants
@danthedeckie

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) ≡jedi≡
x.find()
@davidhalter

This comment has been minimized.

Show comment Hide comment
@davidhalter

davidhalter Oct 20, 2012

Owner

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

Owner

davidhalter commented Oct 20, 2012

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

@davidhalter

This comment has been minimized.

Show comment Hide comment
@davidhalter

davidhalter Oct 20, 2012

Owner

I pushed the changes to the master branch, now.

Owner

davidhalter commented Oct 20, 2012

I pushed the changes to the master branch, now.

@djs

This comment has been minimized.

Show comment Hide comment
@djs

djs 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

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

This comment has been minimized.

Show comment Hide comment
@danthedeckie

danthedeckie Oct 23, 2012

@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 :-/

@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

This comment has been minimized.

Show comment Hide comment
@danthedeckie

danthedeckie Oct 23, 2012

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.

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

This comment has been minimized.

Show comment Hide comment
@davidhalter

davidhalter Oct 23, 2012

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.

Owner

davidhalter commented Oct 23, 2012

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

This comment has been minimized.

Show comment Hide comment
@danthedeckie

danthedeckie Oct 23, 2012

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

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

@ugtar

This comment has been minimized.

Show comment Hide comment
@ugtar

ugtar 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?

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

This comment has been minimized.

Show comment Hide comment
@djs

djs 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.

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

This comment has been minimized.

Show comment Hide comment
@haesken

haesken Oct 27, 2012

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

noremap <C-c> <Esc>

haesken commented Oct 27, 2012

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

noremap <C-c> <Esc>
@djs

This comment has been minimized.

Show comment Hide comment
@djs

djs 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...

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

This comment has been minimized.

Show comment Hide comment
@davidhalter

davidhalter Nov 13, 2012

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.

Owner

davidhalter commented Nov 13, 2012

@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

This comment has been minimized.

Show comment Hide comment
@davidhalter

davidhalter Dec 2, 2012

Owner

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

Owner

davidhalter commented Dec 2, 2012

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

@djs

This comment has been minimized.

Show comment Hide comment
@djs

djs 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.

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.

@davidhalter davidhalter closed this Dec 3, 2012

@jmistx

This comment has been minimized.

Show comment Hide comment
@jmistx

jmistx 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!

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

This comment has been minimized.

Show comment Hide comment
@subsetpark

subsetpark Oct 23, 2015

I am getting this issue with

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

While my encoding is utf-8.

I am getting this issue with

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

While my encoding is utf-8.

@blueyed

This comment has been minimized.

Show comment Hide comment
@blueyed

blueyed Oct 26, 2015

Collaborator

@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.

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