Comments (4)
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.
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.
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.
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)
- [vim9script] Can not change the value of an exported variable under an autoload directory HOT 3
- err: Test_terminal_vt420 HOT 3
- err: Test_debug_with_lambda & Test_debug_running_out_of_lines HOT 3
- One issue with XDG_CONFIG_HOME/vim/vimrc after merging, using symlinks #14182 HOT 7
- E117: Unknown function: strptime HOT 5
- [vim9script] Missing exception when modifying `import autoload`'s `const` variable from `:def` HOT 2
- getregionpos() returns a list of buffer segments for a given range
- Appending text to internal tty may cause vim to hang indefinitely
- Wrong handling of symbolic link in tree view HOT 8
- Toggle comments in code HOT 2
- Wrong DisplayVersion registry key written in Windows 11 HOT 13
- 'breakindent' seems to break gqap HOT 1
- <C-n> doesn't work in the latest release HOT 4
- Support for PowerShell 5.1 on Windows not working as documented HOT 1
- cbuffer/cad doesn't take visual selection as range '<,'>cad HOT 5
- stuck in popup window forever HOT 1
- column number wrong when utf-8 double-wide character is substituted after conceal HOT 6
- synconcealed() broken for matchadd() (works for 'syn match') HOT 4
- High CPU usage on Fedora 40 HOT 4
- vim is too slow when editing *.ass file. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim.