omnicomplete

Vim status bar prediction/completion?

*爱你&永不变心* 提交于 2019-12-04 02:57:27
I played with some vim scripting yesterday and managed to get some over-the-status-bar prediction to whatever I'm typing at the moment, with cycling - see screenshot (gray + yellow bar). Problem is, I can't remember how I got that or find the code snippet I used for that vim magic (I remember it being quite simple): it was either an example in the docs or something I picked up in the vim wiki. So, I'm trying to retrace my steps - any clue on what vimscript function/s to look up for these? I realize this is an odd question, but any clues will be great - thanks. This is done with :set wildmenu

Vim omnicompletion for Java

南笙酒味 提交于 2019-12-03 11:26:57
I've read heaps of blogs on Vim's supposedly great omnicompletion, and yet no matter what I do I can't get it to work satisfactorily. It took me ages to figure discover that the version of ctags that is preinstalled on my system was the emacs one, and didn't have the --recurse option, but now that I've run ctags-exuberant on my copy of the OpenJDK sources to attempt to get some kind of code completion going, Vim hangs whenever I try to invoke it with [C-n] or [C-p]. All I really want is something that works like the code completion in Eclipse; I like Vim as an editor, but Eclipse just has

VIM - Sourcing tags from multiple locations in project

孤人 提交于 2019-12-03 08:21:11
Good day, I typically work on relatively small (less than 20,000 lines of code) projects that are all self contained within a single directory, have their own Makefile, and are fairly easy to work with. VIM is my preferred editor, and when I open a project, I typically build the ctags list via a mapping to the F10 key: map <F10> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR> This allows me to jump to the definition of a variable/struct/etc via moving the cursor over the text, and hitting CTRL + ] , as well as using code completion with a drop-down list via OmniCppComplete. However, I

Calling omnicompletion for every keypress in vim

只谈情不闲聊 提交于 2019-12-01 09:09:47
I have a vim script that uses a one line window to get a filename pattern from the user. This pattern can be completed to a full filename from a database if you press CTRL-X CTRL-O. Now the only problem is that you have to press the auto completion shortcut by yourself. But I want the auto completion to work incrementally so that for every character you type it automatically gets updated (think about the CTRL-R file open dialog in Eclipse). Is there a way to use an autocommand or some kind of callback to call the function behind CTRL-X CTRL-O for each character the user is typing in this

Calling omnicompletion for every keypress in vim

泪湿孤枕 提交于 2019-12-01 06:16:36
问题 I have a vim script that uses a one line window to get a filename pattern from the user. This pattern can be completed to a full filename from a database if you press CTRL-X CTRL-O. Now the only problem is that you have to press the auto completion shortcut by yourself. But I want the auto completion to work incrementally so that for every character you type it automatically gets updated (think about the CTRL-R file open dialog in Eclipse). Is there a way to use an autocommand or some kind of

Is there any way to get python omnicomplete to work with non-system modules in vim?

老子叫甜甜 提交于 2019-11-30 04:13:48
The only thing I can get python omnicomplete to work with are system modules. I get nothing for help with modules in my site-packages or modules that I'm currently working on. Jeremy Cantrell I get completion for my own modules in my PYTHONPATH or site-packages. I'm not sure what version of the pythoncomplete.vim script you're using, but you may want to make sure it's the latest. EDIT: Here's some examples of what I'm seeing on my system... This file (mymodule.py), I puth in a directory in PYTHONPATH, and then in site-packages. Both times I was able to get the screenshot below. myvar = 'test'

Vim's Omnicompletion with Python just doesn't work

感情迁移 提交于 2019-11-28 15:53:01
I've searched around for an hour, both on Stack Overflow and elsewhere. Alas! Please help. Vim's omnicompletion just doesn't work . I have Vim 7.2 compiled with Python support. filetype plugin on is in my .vimrc . When a .py file is open, :echo &omnifunc prints pythoncomplete#Complete . I'm working with a large project and I have a tags file generated with exhuberant-ctags . It's in Vim's ctags path. I can test it by typing ^] on a symbol and I'm then taken to the symbols' definition. Update 1: All of my project's code is in the python-in-Vim's path. I can :python import myproject successfully

How do I map ctrl x ctrl o to ctrl space in terminal vim?

烂漫一生 提交于 2019-11-28 06:42:09
After searching a bit on the net it seems that I can't map Ctrl Space to anything/alot. Is there a way to do it today, what I found was usually 2 years old. I've run into the same issue, the short answer is yes you can, and not only in the gui version. Adding this on you .vimrc is enough: inoremap <C-Space> <C-x><C-o> inoremap <C-@> <C-Space> The problem seems to be that Terminal.app doesn't interpret <C-Space> correctly and Vim understands it as <C-@> which is a built-in mapping ( :help CTRL-@ ). Maybe you could go with something like the following in your .vimrc: if !has("gui_running")

Vim's Omnicompletion with Python just doesn't work

徘徊边缘 提交于 2019-11-27 09:23:31
问题 I've searched around for an hour, both on Stack Overflow and elsewhere. Alas! Please help. Vim's omnicompletion just doesn't work . I have Vim 7.2 compiled with Python support. filetype plugin on is in my .vimrc . When a .py file is open, :echo &omnifunc prints pythoncomplete#Complete . I'm working with a large project and I have a tags file generated with exhuberant-ctags . It's in Vim's ctags path. I can test it by typing ^] on a symbol and I'm then taken to the symbols' definition. Update

How do I map ctrl x ctrl o to ctrl space in terminal vim?

谁都会走 提交于 2019-11-27 01:27:16
问题 After searching a bit on the net it seems that I can't map Ctrl Space to anything/alot. Is there a way to do it today, what I found was usually 2 years old. 回答1: I've run into the same issue, the short answer is yes you can, and not only in the gui version. Adding this on you .vimrc is enough: inoremap <C-Space> <C-x><C-o> inoremap <C-@> <C-Space> 回答2: The problem seems to be that Terminal.app doesn't interpret <C-Space> correctly and Vim understands it as <C-@> which is a built-in mapping (