Questions tagged [autocompletion]

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

81 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
761 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 ...
4
votes
0answers
737 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
0answers
756 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, ...
3
votes
0answers
89 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
1answer
50 views

How to make vim recognize variables from files in the current directory or sub directories?

I have recently been working on a web project and I would like my css files to recognize the classes and ids from the html files. Is there any way to make this work? Edit: So I use coc.nvim. By ...
2
votes
0answers
19 views

How do I get filename completion to ignore a leading '/'?

In a Jekyll file I have <IMG SRC="/assets/images/ I would like to use the filename autocompletion shortcut to insert the rest of the filename, but this fails because of the leading slash. ...
2
votes
0answers
96 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 ...
2
votes
1answer
61 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 ...
2
votes
0answers
564 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
0answers
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/...
2
votes
0answers
63 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
0answers
41 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
1answer
2k views

Integrating autocomplete and snippets

I'm trying to set up an autocompletion/snippet workflow that's a bit complicated. This is stemming from needing a better workflow for latex. Right now I'm using coc.nvim and UltiSnippets but I am ...
2
votes
0answers
396 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, ...
2
votes
0answers
89 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
0answers
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 ...
2
votes
0answers
193 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-...
2
votes
0answers
71 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 ...
2
votes
0answers
224 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
0answers
102 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 ...
2
votes
0answers
878 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 ...
2
votes
0answers
566 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 ...
1
vote
1answer
24 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 ...
1
vote
0answers
25 views

How to show where the word is found when using "auto complete" if it's "The only match"

When I type some letters and hit CTRL+P, vim shows a list of possible words that may complete my letters. On the left of the list, it shows the completed word. And on the right of the list, it shows ...
1
vote
0answers
53 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 ...
1
vote
0answers
236 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-...
1
vote
0answers
95 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
vote
0answers
271 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 ...
1
vote
0answers
44 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 ...
1
vote
0answers
540 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
0answers
387 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
0answers
121 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 ...
1
vote
0answers
29 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 ...
1
vote
0answers
187 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
0answers
740 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 ...
1
vote
0answers
243 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
0answers
84 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 ...
1
vote
0answers
686 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#...
1
vote
0answers
407 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
0answers
485 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 ...
1
vote
0answers
570 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 ...
1
vote
0answers
91 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
0answers
539 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 ...
1
vote
0answers
487 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: ...
1
vote
0answers
102 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....
1
vote
0answers
217 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 ...
1
vote
0answers
307 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'...
0
votes
0answers
10 views

How do I enable completion prompts in Neovim + LSP?

I am using Neovim 0.6.0 nightly (I also have the nvim-lspconfig and hrsh7th/nvim-cmp plugins installed) and have a few different LSP servers which do seem to be working (I have tested them by simply ...
0
votes
0answers
25 views

How can use Tab to navigate completion list

I use both coc.nvim and Ultisnip for completion in vim. coc-snippet does not support some feature in Ultisnip so I use Ultisnip instead But I have a problem is <Tab> for trigger completion in ...
0
votes
0answers
42 views

Use LSP completion

I use rust-analyzer as LSP-server and hrsh7th/nvim-compe for autocomplete. As you can see on the pic, LSP providing some special completion for default() function, but how can I apply it to my code?