Questions tagged [autocompletion]

For questions about the several commands to complete part of a keyword or line that has been typed.

75 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
0 answers
819 views

Can I give YouCompleteMe a static list of completions?

I am using the Julia programming language, and as of right now, there are no good syntax-completer for VIM. I am working on one, but haven't fully got my head around how to hook into ycmd. Til I ...
5 votes
0 answers
840 views

vim compiled with python3 but python3 omni-completion does not work

It used to work when I used python2, but now I can't use ^X^O to complete function names. I do have vim with -python and +python3 (on Ubuntu 16.04), but here is the error I get when trying Ctrl-X ...
4 votes
2 answers
88 views

Show path of file from where the code autocompletion is coming from

When doing auto completion with CTRL+n, I see autocompletion suggestions from the current file as well as from different other files all mixed together as seen below: I would like to get a behavior ...
  • 141
4 votes
0 answers
782 views

How to enable autocomplete for my rails functions

How can I add auto-complete for my Rails project? I want autocomplete for existing rails functions, including gems, and for functions I created. I hope there is some plugin for smart auto-complete, ...
  • 141
3 votes
0 answers
20 views

How to get autocomplete for :set?

E.g. I am trying to change foldmethod to syntax: :set foldmethod=s^I^I When I press tab after typing s, I get ^I instead of auto-completing to syntax. Only possible options are manual,indent,expr,...
  • 161
3 votes
0 answers
160 views

Make <Esc> close completion menu and cancel selection, without side effects

I would like to make my Vim completion menu a little more IDE-like, and I was able to achieve this using the bindings suggested here. However, the <Esc> binding causes a bit of a problem: ...
2 votes
0 answers
202 views

How to sort the list of buffers

How to sort the list of buffers Vim displays on entering :b <Tab> by most recent? I'm used to the Spacemacs ordering, which displays buffer filenames in separate rows (vertically) in the order ...
2 votes
0 answers
102 views

Complete text with one tap

I use a plugin called supertab( ervandew/supertab) that provide completion options. A menu automatically appears after I type 2 characters. What I want to do, is to have a mapping that completes the ...
  • 1,164
2 votes
0 answers
1k views

How to (auto) complete filenames?

Developing in nodejs I have a lot of custom module require statements in my javascript source files, like this one: // // my nodejs program: // path/to/projecthome/lib/someModule.js // const EMOJI = ...
2 votes
0 answers
839 views

How to fix this `Omni completion (^O^N^P) Pattern not found` error?

I am trying to set up syntax keyword based omnicompletion in vim. I have defined a few syntax keyword Constants in ~/.config/nvim/syntax/spl.vim They are correctly detected and highlighted. They are ...
2 votes
0 answers
55 views

How to get this tab/autocompletion setup?

Basically what I want is a PyCharm-like completion: If there is only whitespace, insert <TAB>. If pum is visible and nothing is selected, complete with first, otherwise choose the selected word/...
  • 21
2 votes
0 answers
80 views

Next tab completion item

I was seeing how the different default colorschemes look like in vim. To do that I typed :colo, then space and tab. But then when I want to set the next one, I have to press tab a lot of times to get ...
2 votes
0 answers
45 views

How to omit dictionary source file in dictionary completion

<C-X><C-K> complete words with long dictionary file name, such as /home/xxx/.vim/mydict. I'd like to omit or shorten the descriptive info. I have googled but got no hints. Any advice?
2 votes
0 answers
459 views

Omni completion Pattern not found - Error loading rails environment

I'm trying to make Omni completion work with my Ruby files, but it only works with Ruby's core libraries; for instance, after typing String.<C-X><C-O> i get all Ruby's String methods, ...
  • 121
2 votes
0 answers
102 views

vim recorded session like doitlive

I have a presentation to make for a conference and I'm not allowed to use slides, only live coding. Is there a tool in vim which will help me avoid typos ? :) Something like doitlive which you can ...
2 votes
0 answers
2k views

Why -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) Pattern not found?

vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 30 2017 18:21:38) Included patches: 1-197, 322, 377-378, 550, 703, 706-707 Modified by pkg-vim-maintainers@lists.alioth.debian.org ...
  • 91
2 votes
0 answers
210 views

gvim Linux - autocomplete plugin - enable / disable depending if the user is typing or not

I am using the autocomplete and I feel quite comfortable with it because it's minimalistic and simple. But there is just a thing I dislike: sometimes it interferes with the mouse scrolling auto-...
  • 354
2 votes
0 answers
79 views

Filename completion without suffix

By using suffixesadd I can navigate modules without file extensions. However, when I import modules by using path completion(<C-X><C-F>) the file extensions do not get omitted. Are there ...
  • 189
2 votes
0 answers
260 views

Comprehesive support for graphviz (linting/autocompletion/snippets)

Vim comes with some support (syntax highlighting) out of the box for the DOT language (graphviz) In addition, I found the plugin: https://github.com/wannesm/wmgraphviz.vim, which provides integrated ...
2 votes
0 answers
108 views

No omnicompletion in Vim for python

So I got YouCompleteMe working for python autocompletion. Whenever I use a . operator such as: import sys sys. It shows the correct suggestions. Note that I didn't have to hit CtrlSpace. But when I ...
's user avatar
2 votes
0 answers
925 views

Code Completion for Module based JavaScript files in Vim

I've been trying to get my Vim setup similar to other IDE's (pycharm, webstorm) and I'm hoping to get the functionality of having code completion for injected objects. I have YouCompleteMe and ...
  • 39
2 votes
0 answers
611 views

Trying to get a particular SuperTab behavior with snippets and omnicomplete

I'm trying to get SuperTab to work a particular way with .tex files. I am also using the vimtex plugin as well as snipMate. The behavior I want is the following. In most text, I want the main ...
  • 245
1 vote
0 answers
39 views

Completion menu closes after typing more characters in substring matches

Let's assume you have the following completefunc defintion: vim9script const py_keywords = [ { 'word': 'pandas.api.extensions.ExtensionArray.argsort'}, { 'word': 'pandas.api.extensions....
  • 481
1 vote
1 answer
34 views

how to get similar completion from coc as ycm

I've been user of YCM for years now. Recently discovered coc-vim and trying it out. Looks like it provides loads of additional features on top of what YCM has. One thing that I can't figure out how to ...
  • 131
1 vote
0 answers
92 views

How do I cycle through autocomplete items with tab while also filling in the current selection in buffer?

I have the following in my init.vim "If PUM (complete menu) is visible, then execute <C-y> (which selects an item), otherwise, do a normal tab inoremap <silent><expr> <TAB&...
1 vote
1 answer
163 views

How to autocomplete from dictionary while typing?

I've set a dictionary with the command: set dictionary+=~/Dictionary.txt And add the following command to make more quickly to access it: set complete+=k But I still have to press <CTRL-N> to ...
  • 33
1 vote
0 answers
788 views

NeoVim latest version autocompletion opens and closes immediately

I am new to Vim and NeoVim, I setup the latest NeoVim on MAC using brew install nvim --head. I setup the latest verison for the lsp suppport. I installed the CoC plugin and the CoC-go plugin for auto-...
  • 141
1 vote
0 answers
375 views

How to fix/customise coloring for the autocompletion popup menu?

I'm not really happy with the syntax coloring of the auto-completion menu. Probably the pink-ish background color is the least unpleasant thing, but the grey foreground text is really not as readable ...
  • 1,756
1 vote
0 answers
501 views

Vim: How to have YouCompleteMe autocomplete shell script variable names and functions from "source"d files?

I use macvim with YouCompleteMe (YCM), which I recently updated and recompiled. I followed the YCM instructions for OSX. I'm also using iterm2, tmux and zsh, all of which are installed with brew and ...
  • 111
1 vote
1 answer
261 views

How to explicitly open the signature preview window when not completing?

When using <c-x><c-o>, vim opens a signature preview window which is different from the one opened when using :ptag. How to open that one when not completing like when reviewing in ...
  • 76
1 vote
0 answers
46 views

Word or phrase completion based on file

I would like to create a file people.txt which has contents such as George Bush Hillary Clinton Santa Clause If I am in vi and type "Clau", vi suggests "Santa Clause". Likewise, if I type "eorg", vi ...
  • 111
1 vote
0 answers
601 views

Autocompletion doesn't work when using ALE + deoplete

From my init.vim (I've checked that it doesn't work even with a minimal configuration): call plug#begin() Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'dense-analysis/ale' Plug '...
1 vote
0 answers
487 views

How to get YouCompleteme to work with kernel headers

I am taking an OS class and we have an upcoming assignment involving Kernel modules. I'm reading Wiley OS text to prepare and they have the below code. I keep on getting an error that the header files ...
1 vote
0 answers
155 views

Prevent "Pattern not found" error in autocompletition (i_Ctrl-N)

I use the following mapping for <Tab>: inoremap <expr> <Tab> getline('.')[col('.') - 2] =~ '\w' ? "<C-N>" : "<Tab>" It works well except that if I want to insert a tab ...
  • 354
1 vote
0 answers
33 views

Is it possible to have auto suggestion of schema names?

(tag suggestions welcome) I've just started learning Vim. My other text editor, which I use for writing Hive queries is a browser based editor which has this very useful feature of auto suggesting ...
  • 123
1 vote
0 answers
213 views

How to get html tag auto completion?

I can't seem to figure out how to implement auto tag completion for html. Is there a plug-in or something else you guys use that works? Is there just one thing I can download that will handle ...
1 vote
0 answers
830 views

How to automate Vim's native auto-completion with a drop-down menu?

I know there is a ton of plugins and topics that discussing about auto-completion things in Vim! I just need the Vim's native auto-completion to be automated! auto-suggestion words, etc from ...
  • 11
1 vote
0 answers
265 views

Issues with autocomplete in vim8

I have installed two vim plugins javacomplete2 and vim-emoji successfully but I'm not able to use their auto-prompting feature which enables the user to select an autocomplete suggestion without ...
1 vote
0 answers
93 views

Fish-like autosuggestions depending on 'completeopt'

I describe this as Fish-like as it is referenced as such by zsh-autocomplete, and I would define it as follows: The appearance of a (temporary) automatically inserted completion match, that is ...
  • 275
1 vote
0 answers
760 views

asyncomplete.vim: how can I automatically show the completion menu after two succeeding 'word'-characters?

I'm trying to configure asyncomplete.vim so that the completion menu is shown when inserting at least two succeeding 'word'-characters. However, I'm having trouble understanding why asyncomplete#...
  • 275
1 vote
0 answers
445 views

How do I get vim to autocomplete correctly for :! on Windows?

On Vim 7.3 on Windows, if I use Tab to autocomplete paths with nonstandard characters in many cases, it works fine. For example: :n 2016\ Posts\\feb\something.txt If I press Tab after '2' and 'f' ...
1 vote
0 answers
500 views

vim c++ clang_complete doesn't work for std::cin.get()

I'm using vim to do c++ projects on Mac OS X. To auto complete, I use this plugin: clang_complete For most of cases, such as members of user-defined classes, members of namespaces, it works very ...
  • 893
1 vote
0 answers
577 views

How to use external python modules with NeoComplete?

After trying out many auto-completion engines for Vim, NeoComplete combined with Jedi seems like a good choice for python development. However, I can't get it to use external libraries like PySide (Qt ...
  • 219
1 vote
0 answers
92 views

Changing color value for css syntax when using tab completion via emmet

Im using vim 7.4 and the Emmet plugin. While editing a css document and entering a selector .mylink for example, pressing Tab will typically yield a space, opening and closing braces and a blank line ...
1 vote
0 answers
619 views

gtk.h not found

I am now using vi to edit a Gtk program in C. I can compile it easily using the command: gcc -Wall `pkg-config --cflags gtk+-3.0` -o gtk gtk.c `pkg-config --libs gtk+-3.0` There is no problem doing ...
  • 267
1 vote
0 answers
515 views

Location list, preview window, autocompletion

I have the following problem. If the location list is open (e.g., by Syntastic) and some other plugin opens a preview window (e.g., YCM or jedi-vim), the cursor goes in the location list. Example: ...
  • 11
1 vote
0 answers
132 views

How can I enable onmifunc completion automatically?

I want to enable omnifunc in my MacVim whenever I start to type in a few of leading words, such that whenever I type np., the completion list pops up to show me the candidates (e.g. np.random, np....
  • 487
1 vote
0 answers
225 views

Difference between smart_close_popup() and cancel_popup() in neocomplete?

I have started using neocomplete and there's one thing that confuses me. What's actually the difference between neocomplete#smart_close_popup() and neocomplete#cancel_popup() I am definitely not ...
  • 111
1 vote
0 answers
317 views

Problem using LaTex .bib file with UltiSnips completion

Environment Ubuntu 14.04 Vim 7 Tmux I'm just trying to create some snippets for UltiSnips and writing bib files. What I want To create custom snippets that will make writing bib files (that I can'...
  • 795
0 votes
0 answers
19 views

How Can I Put Multiple Things Into One Completion Menu

I found this in the complete() documentation: inoremap <F5> <C-R>=ListMonths()<CR> func! ListMonths() call complete(col('.'), ['January', 'February', 'March', \...