Coder Social home page Coder Social logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 13, 2024
I was not able to reproduce on Windows gvim 7.3.198 following the instructions 
given, after launching Vim with "gvim -N -u NONE -i NONE".

Nevertheless, I see similar behavior all the time when editing C code in my 
normal Vim configuration (i.e. using omnicompletion in C code causes the menu 
to flash briefly then vanish). I finally investigated a little and came up with 
two separate causes, either of which will independently trigger the behavior.

My completeopt is set to menuone,preview,longest. When editing C code with the 
default omnifunc in the C ftplugin, and with fdm=syntax, and with foldlevel=1, 
the BufEnter autocmds of the Taglist plugin seem to trigger this behavior 
(discovered by removing all autocmds one group at a time from my config until I 
found the group doing it, then trying again and removing autocmds one event at 
a time from the group found previously). Also, the following commands in my 
.vimrc seem to trigger it:

    " get rid of scrolloff option for certain buffers like the quickfix and
    " preview windows
    autocmd BufEnter *
          \ if (&ft=='qf' || &previewwindow || bufname('%') ==# "__Tag_List__") && !exists('s:scrolloff_sav') |
          \   let s:scrolloff_sav=&scrolloff |
          \   set scrolloff=0 |
          \ endif
    " File type will not be set on the first BufEnter
    autocmd Filetype qf
          \ if !exists('s:scrolloff_sav') |
          \   let s:scrolloff_sav=&scrolloff |
          \   set scrolloff=0 |
          \ endif
    autocmd BufLeave *
          \ if (&ft=='qf' || &previewwindow || bufname('%') ==# "__Tag_List__") && exists('s:scrolloff_sav') |
          \   let &scrolloff=s:scrolloff_sav |
          \   unlet s:scrolloff_sav |
          \ endif

I plan to investigate further to get a much more refined set of 
triggers/simpler test case, but that's as far as I've gotten so far in the hour 
or two I've spent on it.

The original issue report does not mention trying without .vimrc or plugins 
(they launch Vim with just "vim foo.py") so I wonder if maybe they also have 
Taglist installed or a plugin that does something similar.

Original comment by [email protected] on 25 May 2011 at 2:35

from vim.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 13, 2024
You are absolutely right, I idiotically tested with my own .vimrc. Anyhow, 
using awesome debug magic I traced down :set ruler to be additional culprit 
here, no plugins.

Updated instructions:
1) Open a new python file with vim
1) a) vim -N -u NONE -U NONE -i NONE foo.py
2) Set completion
2) a) filetype plugin on
2) b) set omnifunc=pythoncomplete#Complete
2) c) set completeopt=menuone,menu,longest,preview
3) Set trouble makers
3) a) set cursorcolumn
3) b) set ruler
4) Import some stdlib that has docstrings

import string
foo = ""
foo.

5) Press <C-X><C-O>
6) Choose from list
7) Menu will vanish

Original comment by [email protected] on 26 May 2011 at 5:10

from vim.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 13, 2024
I confirm – I can reproduce the problem using Vim 7.3.189 and C++ omni 
completion from Vissale NEANG.

Original comment by [email protected] on 26 May 2011 at 8:51

from vim.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 13, 2024
Fixed by 7.3.807

Original comment by [email protected] on 29 Sep 2014 at 5:08

  • Changed state: Fixed

from vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.