Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [autocompletion]

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

Filter by
Sorted by
Tagged with
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
0 votes
0 answers
18 views

Auto importing issue from installed npm packages in neovim (only in js not ts)

I mainly use Neovim for my MERN stack work and it's been a few days, I have noticed that from some of the installed npm packages of my project, I wasn't able to auto-import the functions or components....
Nitesh's user avatar
  • 1
0 votes
0 answers
38 views

How to make lua_ls provide completion for luasnip methods?

I am using luasnip in Neovim and I'm having problems getting lua_ls to provide information about the functions. local ls = require("luasnip") local s = ls.snippet Basically, I want when ...
darkfrobozz's user avatar
0 votes
0 answers
53 views

input with completion in times of lua (nvim-cmp ?)

let user_dir = input('Enter a directory: ', '', 'dir') This is simple not working for me. When I press <tab> instead of completion, I get ^I . I use nvim-cmp. Could it be the reason? Can I use ...
eyal karni's user avatar
  • 1,136
0 votes
1 answer
27 views

html id completion

I'm familiar with vim's built in completion, one of the completion methods allow me to autocomplete filepaths. I am working with a large html project where I need to reference filepaths along with id'...
cuppajoeman's user avatar
1 vote
1 answer
15 views

Insert abbreviation and open completion

I sometimes add abbreviations for local files or projects. For example having: PREFIX_FOO PREFIX_BAR PREFIX_BAZ Instead of typing PREFIX_ I map it to something, for example PP or P1, P2, ... etc. :...
user3342816's user avatar
1 vote
1 answer
52 views

Using the completion function for a command that is passed as an argument to another command

Is it possible to programmatically get a command's definition so that its completion function can be called manually? Alternatively, is it possible to define a command such that the first argument is ...
Pak's user avatar
  • 1,114
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
51 views

VimTeX omnicompletion for bibliography

Problem with builtin omnicompletion for bibliography. It works on main.tex, but not in the chapters. This is the tree structure: ├── chapters │   ├── actors_behaviour.tex │   ├── analysis_acts.tex │   ...
enrico223's user avatar
2 votes
1 answer
142 views

E93: More than one match when <C-d> shows only one match

When jumping between buffers in Vim, most the time things work quite smoothly. I like to jump to buffers by writing :b something1*something2, checking if the match is unique by invoking C-d, and if so ...
user22476690's user avatar
0 votes
0 answers
84 views

Preventing copilot suggestions when "normal" suggestions are present

Since my last update of my plugins, copilot now gets in a fight with CoC trying to complete. The result is that I can't use tab to select the first CoC suggestion, since it will apply the copilot ...
Davis Yoshida's user avatar
3 votes
1 answer
218 views

Is it possible to populate the autocompletion popup before all the results are fetched?

I greatly make use of Vim's <C-n>/<C-p> auto-completion menu. When working on large projects, or on sporadic large files, this may take several seconds or longer to be populated. Is there ...
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
45 views

configure omnicomplete to use `gj` `gk` to go the next and previous completion

Having decided to use the arrow keys to navigate instead of hjkl, and having decided that I want to move to the previous screen line, not actual text line, I have put this on vimrc nnoremap <Up> ...
Rho Phi's user avatar
  • 111
1 vote
1 answer
344 views

Cmp conflicts with native autocomplete i_CTRL-P and i_CTRL-N

I use lsp-zero.nvim and it requires nvim-cmp which is what I think is causing the problem. How can I retain the native autocompletion i_CTRL-P and i_CTRL-N while also using cmp?
enrico223's user avatar
0 votes
0 answers
35 views

Popup to show number of matches of a given string while in insert mode, and while completion popup is being shown

This is a follow up to a previous question. Thanks to that, I could come up with this augroup: augroup Foo autocmd! autocmd TextChangedI,TextChangedP * call <SID>foo() fun s:foo() let ...
Enlico's user avatar
  • 2,214
0 votes
1 answer
25 views

iabbrev with autocompletition

I had setup the following iabbrev for my Verilog settings: iabbrev module module<Enter>(<Enter><Enter>);<Up><Up><Up><End> iabbrev begin begin<Enter><...
xyx's user avatar
  • 464
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
0 votes
0 answers
174 views

OpenMP not detected by clangd despite compile_commands.json

My program compiles fine, but within Vim (with CoC + clangd) I get the linting error: #include <omp.h> 'omp.h' file not found (clang pp_file_not_found) I use bear -- make as described in https://...
strbry's user avatar
  • 1
0 votes
1 answer
409 views

Down arrow key triggers coc#pum#visible() ? coc#pum#next(0) : "\"

I am using NVIM 0.9.0 stable release with Conqueror of Completion which I installed recently. I am used to using the arrow keys in insert mode for quick navigation between two lines. After installing ...
InfoDaneMent's user avatar
0 votes
0 answers
21 views

Shortcut keys sometimes type commands into the buffer for the file I am editing

I'm using gvim with the included mswin.vim keybindings, so Ctrl+S AKA C-S will save the buffer. It provides these mappings. " Use CTRL-S for saving, also in Insert mode (<C-O> doesn't work ...
interfect's user avatar
  • 163
1 vote
1 answer
65 views

Autocomplete opens in the wrong window

When using vim with coc installed, auto-complete is always opening and characters are being inserted into the window where the first auto-complete was displayed. I have a directory with two files (...
Noah Callaway'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
1 answer
572 views

Prevent Neovim LSP from opening a scratch preview buffer

When auto-completing with neovim's LSP, whenever selecting a menu entry from the auto-complete list a scracth/preview buffer is created, even if empty: How can I disable these buffers specifically ...
Mihai Rotaru's user avatar
0 votes
1 answer
84 views

Adding dictionary words list to deoplete plugin

Let's say I have a list of words in one file in my home directory (each word is in a separate line): bar barfoo foo foobar ... How can I add this list of words to Vim deoplete auto-completion plugin? ...
C_Note's user avatar
  • 1
0 votes
1 answer
111 views

<tab> autocompletion not working

I installed ycm with vimplug and it's working, but I have to press <C-n> to scroll through the autocompletion menu. How can I remap that to <tab>? my .vimrc: call plug#begin() Plug '...
C0sM1n's user avatar
  • 3
2 votes
1 answer
50 views

Access to the CTRL-N auto-complete UI functionality

I have a list of strings in an external file. I want to be able to access those strings, and perform the auto complete functionality on those, in the same way that CTRL-N works usually. See the below ...
mmm111mmm's user avatar
  • 147
0 votes
2 answers
2k views

Go to definition with LSP

I'm trying to use Jedi to do "jump-to-definition". For example, if my cursor is on MLPClassifier, I want to be able jump to the place where that class is defined in Python code from the ...
efthimio's user avatar
  • 101
0 votes
1 answer
36 views

Why inoremapping <c-e> shadows <c-e> completion functionality?

Foreword Open a new file with vim -Nu NONE and insert the following text (| is to indicate the position of the cursor, in insert mode) longline lo| longerline Now hit Ctrl-XCtrl-N and the ...
Enlico's user avatar
  • 2,214
0 votes
0 answers
28 views

Remove words from comments in vim autocompletion

I have looked for similar questions but I was quite surprised to not find anything similar... either I am the first person on this planet to have this issue, or I have searched using bad keywords. ...
Tropilio's user avatar
  • 109
1 vote
1 answer
1k views

In neovim, can I use Enter to accept a command completion instead of executing the command?

Using neovim (v0.8.1 on Fedora 37) with its default configuration in my home directory, when I type :e <tab> the completion menu pops up, the first entry (here Desktop) is highlighted and the ...
Quappas's user avatar
  • 63
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
2 answers
115 views

Shorter way to call specific plugin function

In the middle of a Vim session, I need to call a particular plugin's function via: :call UltiSnips#RefreshSnippets() When from normal mode I type :call UltiS<Tab>, it auto-expands to ...
Tryer's user avatar
  • 247
0 votes
1 answer
57 views

How do I call a user-defined command from a function, and wait until it finishes?

The two functions in the script below can be called independently via key mappings <leader>1 and <leader>2. In a perfect world, <leader>1 will always be called first. If the user ...
Phil R's user avatar
  • 503
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
1 vote
1 answer
92 views

Smart way to type latex `\SI{..}{..}` macro in vim (snipped/autocompletion)

A physics high school student of mine is typesetting latex documents using vim. I noticed however that he doesn't use the siunitx package which typesets units properly. However the syntax for example \...
dp21's user avatar
  • 13
0 votes
1 answer
36 views

ctrl-x, ctrl-k spelling completion not working on Windows

I use the same configuration on Linux and Windows. This is the config for spelling: " Set dictionary and regenerate spl files on startup set dictionary+=/usr/share/dict/words set spelllang=en_gb ...
paradroid's user avatar
  • 367
0 votes
1 answer
64 views

How to get the command short form for custom commands?

The built-in Vim command have a nice property. You have only to type as much such that Vim can guess the command. For :cclose you can type: :ccl :cclo :cclos :cclose Is there a way to get the same ...
Vivian De Smedt's user avatar
0 votes
0 answers
59 views

How can I enable html autocomplete in .tmpl files?

I'm editing .tmpl files which are mostly html with some template language syntax inside {{ double curly braces }}. I'm using COC for autocompletion and I want to be able to use the autocomplete ...
hermancain's user avatar
0 votes
2 answers
389 views

Remap line completion to Ctrl-X

I am trying to remap the line-completion command (^X^L) to the simpler ^L (or Ctrl-L, or <C-L>). VIM's help (see :h ins-completion) suggests the following : :inoremap ^L ^X^L I tried adding ...
Feffe's user avatar
  • 1,761
4 votes
1 answer
115 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,...
balki's user avatar
  • 355
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
0 votes
2 answers
686 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 ...
laur's user avatar
  • 159
0 votes
1 answer
55 views

Why Does Auto-Completion Returns Commands that Don't Work?

Why does VIM allow auto-completion of items that are not a valid command? For example, if I type :s, and press the tab key, the following entries are displayed: However, none of these commands seem ...
Lonnie Best's user avatar
1 vote
0 answers
13 views

How can I get language and keyword completion in omnifunc? [duplicate]

Let's say I'm editing this Python script: something = 1 something_else = 2 My cursor is on the third line, in insert mode. When omnifunc is unset, <C-X><C-O> displays an error: E764: ...
Big McLargeHuge's user avatar
0 votes
1 answer
762 views

Indent changes when using CoC, how do I stop this?

I have set up my init.vim file to always use tabs as indentation by adding this to it: set tabstop=4 set shiftwidth=4 set noexpandtab Ever since I installed CoC to use Rust's language server, it ...
Katie And's user avatar
2 votes
1 answer
130 views

Vim autocomplete to store words between documents

User statement: I use Vim to write many technical text documents, including emails. Question: Is it possible to "store unique words" from past documents in some .vim/file that would be ...
jmlarson's user avatar
  • 125
3 votes
1 answer
338 views

How to undo in ctrl-x mode?

Let's say I just completed following path using Ctrl-x, Ctrl-f (twice) and I haven't exited the Ctrl-x mode yet and I got /home/john.doe/ Let's say I chose john.doe accidentally and actually want to ...
flawr's user avatar
  • 185
0 votes
1 answer
516 views

Slow down system when open nvim [closed]

When I open neovim, system slows down. Even neovim's itself. switching between buffers take one or two seconds. I think this is because of autocompletion system. I use Coc. When I run neovim, a ...
Reza Hosseinzadeh's user avatar
2 votes
1 answer
222 views

Autocomplete LateX citations in chapters directory

Currently writing my thesis using LateX, I'm trying to obtain autocomplete on my citations when writing the chapters. The directory structure is that each chapter has its own main.tex files (template ...
Jeanot's user avatar
  • 23

1
2 3 4 5
8