Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [autocompletion]

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

85 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8 votes
0 answers
881 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 ...
Frames Catherine White's user avatar
6 votes
0 answers
999 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 ...
PlasmaBinturong's user avatar
5 votes
2 answers
110 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 ...
BiBi's user avatar
  • 151
5 votes
0 answers
830 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, ...
Nermin's user avatar
  • 151
3 votes
0 answers
555 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 ...
Daniel Paleka's user avatar
3 votes
0 answers
256 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: ...
Paul Siegel's user avatar
3 votes
1 answer
245 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-...
xyx's user avatar
  • 464
2 votes
1 answer
69 views

How to make file completion for a hidden file?

I use ctrlx f to autocomplete the file path. But the popup window won't have the dot file (hidden file, here it is the .obsidian.vimrc file I want to find) unless I press . first, then press ctrlx f. ...
lizhe's user avatar
  • 137
2 votes
0 answers
124 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 ...
eyal karni's user avatar
  • 1,136
2 votes
0 answers
144 views

omni complete throwing "E119: Not enough arguments for function: 1" error

I have <C-x><C-o> working just fine with neovim with my old vim configuration but when I switch over to my new config, I'm not having any luck and I can't figure out why. When I hit <C-...
StevieD's user avatar
  • 1,492
2 votes
0 answers
2k 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 = ...
Giorgio Robino's user avatar
2 votes
0 answers
1k 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 ...
itsfarseen's user avatar
2 votes
0 answers
630 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 ...
spacecadetmatt's user avatar
2 votes
0 answers
59 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/...
chom's user avatar
  • 21
2 votes
0 answers
84 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 ...
CcVHKakalLLOOPPOkKkkKk's user avatar
2 votes
0 answers
48 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?
asepsiswu's user avatar
2 votes
0 answers
501 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, ...
Gerry's user avatar
  • 121
2 votes
0 answers
115 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 ...
whoopdedoo's user avatar
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 [email protected] ...
scrapy's user avatar
  • 91
2 votes
0 answers
86 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 ...
Jian's user avatar
  • 219
2 votes
0 answers
290 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 ...
Dr Krishnakumar Gopalakrishnan's user avatar
2 votes
0 answers
114 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 ...
user avatar
2 votes
0 answers
976 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 ...
Grant A's user avatar
  • 39
2 votes
0 answers
675 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 ...
evencoil's user avatar
  • 245
1 vote
0 answers
37 views

Using count with completions

Say I'm using the completion menu in vim, and I see the word I need as the 9th suggestion. Is there a way to use a count and execute <C-n> 9 times to access the desired completion?
user22476690's user avatar
1 vote
0 answers
43 views

How can I ask autocompletion to ignore buffers matching a pattern?

I make use of vim's <C-n>/<C-p> auto-completion menu with the default complete setting .,w,b,u,t,i. This generally works great, but I'd like to have Vim ignore buffers from a certain ...
user22476690's user avatar
1 vote
1 answer
39 views

How to jump to location of completion from another file?

In Vim, oftens I happen to be using some completion that vim provides for me in the Ctrl n/Ctrl p menu. If the completion happens to be from some other file, I know that Vim knows where it comes from ...
user22476690's user avatar
1 vote
1 answer
79 views

How to restrict tab-completion to the file name when opening a buffer

I know that I can do: :b home<tab> and vim will autocomplete to all buffers with the word "home" in them. My problem is that this includes all buffers that have "home" ...
Bruce Johnson's user avatar
1 vote
0 answers
17 views

Can I interrupt the loop through a command completion custom list to trigger recomputation of the list?

Here's a minimal example: function s:compl_list(argLead, cmdLine, cursorPos) if a:argLead == 'opts=' return map(['op1', 'op2', 'op3'], {_, v -> a:argLead . v }) endif return ['initial', '...
Enlico's user avatar
  • 2,214
1 vote
0 answers
58 views

Completion for ++flags in command-line mode

Is there any way to turn on tab completion for the various ++[flag] flags that some commands take? For example, :e ++ff=unix whatever.txt overrides fileformat to unix for whatever.txt, but :e ++<...
rampion's user avatar
  • 201
1 vote
0 answers
40 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....
r_31415's user avatar
  • 576
1 vote
0 answers
1k 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&...
Jay Pillai's user avatar
1 vote
1 answer
489 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 ...
rpmeira's user avatar
  • 43
1 vote
1 answer
1k views

Vimtex+YouCompleteMe: How to disable autocompletion on plain text?

I have recently setup vimtex and YCM as the associated autocompleter. These work great in their intended scenario, however I believe the autocompleter is giving suggestions when I am typing plain text ...
Zeta-Squared's user avatar
1 vote
0 answers
992 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-...
Pharaoh's user avatar
  • 141
1 vote
0 answers
32 views

autocompletion - set iskeyword disabling highlights

I have set up some syntax highlights for some patterns, for example: sc.nextInt() nextInt will be highlighted as a Function... Then I have included :set iskeyword+=(,.,) in order for autocompletion ...
Something's user avatar
1 vote
0 answers
328 views

How to display additional info for a completion option in second popup menu

The coc.nvim plugin has a really cool feature where the completion, or at least the python completion, will have additional information about the option in a second popup menu. I have looked through a ...
Prismavoid's user avatar
1 vote
0 answers
180 views

How to autocomplete path using alias root?

I'm working on frontend project, we're using root alias, like: import from '~/src/components/button'; instead of: import from '../../../../../components/button'; But when I try to import from ~/, my ...
Lai32290's user avatar
  • 275
1 vote
0 answers
596 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 ...
Enlico's user avatar
  • 2,214
1 vote
0 answers
770 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 ...
Life5ign's user avatar
  • 111
1 vote
2 answers
426 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 ...
bkdm's user avatar
  • 176
1 vote
0 answers
49 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 ...
Mark S.'s user avatar
  • 111
1 vote
0 answers
680 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 '...
11122345791216212837's user avatar
1 vote
0 answers
184 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 ...
xyx's user avatar
  • 464
1 vote
0 answers
34 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 ...
Doug Fir's user avatar
  • 123
1 vote
0 answers
242 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 ...
user388297's user avatar
1 vote
0 answers
956 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 ...
Mohammad Hossein's user avatar
1 vote
0 answers
278 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 ...
Utkarsh Verma's user avatar
1 vote
0 answers
109 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 ...
Bart's user avatar
  • 305
1 vote
0 answers
888 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#...
Bart's user avatar
  • 305