Maciej Kalisiak wrote:
> I'm using Vim 7.0 on WinXP SP2. I don't think I did anything specific
> to turn on omni-completion (perhaps it's on by default? I'm editing
> Python files), and I'm in no rush to start using it, although if it
> was non-intrusive I wouldn't mind leaving it on. The problem is that
> I've recently modified my path variable in Vim, and now whenever
> omni-completion kicks in -- and it's often -- Vim comes to a loooong
> stop, 'scanning tags'. I take it that the scan goes through all files
> in my path. Admittedly my path is now fairly deep:
> let home='C:\Documents\ and\ Settings\Maciek\My\ Documents\Home'
> let &path.=','.home.'\python\**'
> let &path.=','.home.'\research\**'
> let &path.=',c:\Python24\Libs\**'
> Probably the last entry is the killer. Still, I chose to include
> these directories/trees in my path as I find the :find command very
> useful, much more than the omni-completion; hence if push comes to
> shove, I'll ditch omni-complete first.
You don't mention what you are actually doing. Omni completion should
only do something when using CTRL-X CTRL-O in Insert mode. Otherwise it
should not do anything. However, it's possible that mappings change
behavior. Then where does this mapping come from? Use this to find
out:
:verbose imap
> My question: can anything be done to improve the situation on the
> omni-completion front? Obviously the constant scanning is killing me;
> making it faster without sacrificing path variable would be nice.
> Also, I'd like to be able to trigger it only when I ask for it, and
> not have it automatic. Also, since I use ctrl-n and ctrl-p a lot to
> complete the word under cursor *using only the current file*, I'd
> prefer omni-completion to be under a different key combo.
Hmm, perhaps you are not talking about omni completion but about normal
Insert mode completion. This now scans other files sooner than in
previous versions, so that the menu can be filled. Note that you don't
have to wait for this to complete, typing a character will stop it.
> Also, I would've thought omni-completion would use some sort of
> caching mechanism, rather than rescanning all the files every single
> time. Doesn't it do that? Most of the time I hit Ctrl-C to interrupt
> the scanning of tags, so I can get on with my work, but I could have
> sworn I let it run once or twice to completion before, with no
> discernible improvement on subsequent completions...
Caching would add to the complexity, and Insert mode completion already
is too complex. It needs to be cleaned up first.
--
You have heard the saying that if you put a thousand monkeys in a room with a
thousand typewriters and waited long enough, eventually you would have a room
full of dead monkeys.
(Scott Adams - The Dilbert principle)
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///