Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
0 votes
1 answer
53 views

why is inoremap parentheses, brackets, quotes not working

I'm new to vim and trying to configure vim for my coding learning course. I tried these very basic inoremap lines in my ~/.vimrc, and there are also similar lines for <>'", but none of them ...
user avatar
  • 13
0 votes
0 answers
21 views

Clang_complete not working (User defined completion (^U^N^P) E486: Pattern not found)

Can't get clang complete to work. I always get the same error (User defined completion (^U^N^P) E486: Pattern not found). Can anyone help?
user avatar
0 votes
0 answers
36 views

forced inserted ^Z in coc

I'm using the plugin coc for autocompletion. My problem is that when coc opens the pop up menu with the completion items and I continue typing then a ^Z character is inserted in the buffer as shown in ...
user avatar
0 votes
0 answers
43 views

Enable icons for nvim-lsp

How to enable icons inside autocomplete window for nvim-lsp plugin? Now my autocomplete windows looks like this: But want make something like that:
user avatar
1 vote
1 answer
37 views

Enabling Autocompletion for a Custom Command

I have the following lines in my vimrc: command -nargs=1 Compare call Compare(<f-args>) function Compare(file) execute "vnew " . a:file setlocal nomodifiable wincmd h ...
user avatar
  • 13
0 votes
1 answer
44 views

Remapping Keys in Insert Mode Completion ( Autocomplete / ^X )

Using: NeoVim I would like to remap j/k in Insert completion mode: tab starts autocompletion (done, used :help ins-complete example) j/k navigate results like <C-n>/<C-p> If I understand ...
user avatar
3 votes
1 answer
92 views

Sort tab-completion suggestions (files first, then directories) in vim command line

When i go to command mode, type :e and press tab, i get like this Excuse the file, directory writings on the right side (used for explanation) A.cpp file Adamwathan/ directory ...
user avatar
  • 111
1 vote
2 answers
39 views

-complete=file without extra processing of the arguments

Without -complete=file: command! -nargs=* C1 echo <q-args> C1 fzf#vim#grep /home/yuri/.vim/pack/foo/start/fzf.vim " fzf#vim#grep /home/yuri/.vim/pack/foo/start/fzf.vim With -complete=file: ...
user avatar
  • 339
1 vote
1 answer
311 views

Completion sources not recognized by nvim-cmp

I recently transitioned from LanguageClient-neovim to built-in lsp support and completion using omnifunc. However I was enticed by the promise of auto-imports and completion snippets including ...
user avatar
0 votes
1 answer
72 views

Vim autocomplete not caching

In some of my projects, vim autocomplete is very quick, but in other projects it hangs the editor while displaying a status line "examining file ..." that slowly crawls through all the files ...
user avatar
0 votes
0 answers
30 views

Autocomplete strings with spaces

Am using conqueror of completion with latex autocomplete. Created a label with spaces. If i type \ref{, autocomplete will display that label as one of the options, however ctrl+n will only complete ...
user avatar
1 vote
2 answers
24 views

How can I leave completion mode keeping the completion result in a binding when there's no popup?

Currently: I have some key binding A → ^X^O (in insert mode) to omni-complete something I have some key binding B → ^Ogj to temporarily do something in normal mode (in this case, move down a display ...
user avatar
-1 votes
1 answer
528 views

Error while configuring nvim cmp

I am trying to configure nvim-cmp (https://github.com/hrsh7th/nvim-cmp), by adding the following lines to ~/.config/nvim/lua/lsp-config.lua. After this, when I start nvim, I get an error as shown in ...
user avatar
0 votes
0 answers
15 views

Remapping shortcut to discard auto-complete suggestion box

When vim suggests completions, I can discard them without accepting with Ctrl+y I would like to remap that shortcut to Escape while keeping the usual behavior of Escape (exit insert mode) when no ...
user avatar
0 votes
0 answers
43 views

High vim CPU usage at GUI but not the CLI

I've previously noticed that vim spikes up the CPU usage whenever I scroll up or down at the terminal emulator within the GUI , and when I inspect the process it turns up to be xorg . I tried to ...
user avatar
1 vote
1 answer
81 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 ...
user avatar
  • 13
0 votes
0 answers
81 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 ...
user avatar
  • 363
0 votes
1 answer
114 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 ...
user avatar
0 votes
0 answers
81 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?
user avatar
  • 1
0 votes
1 answer
50 views

vim autocompletion in vimscript

I wanted to make a vim snippet in my vimrc, without using a plugin. I want it to appear automatically when I type Ctrl-N iabbrev was good for short code addition, as mentioned in this post https://vim....
user avatar
0 votes
0 answers
29 views

How can I make vim recognize when to <Enter> on autocomplete?

Im using TabNine YCM fork vim plugin. I'm getting cool suggestions and all, but it's super annoying that it doesn't <Enter> when it should, instead, outputs NULL ASCII Code ^@ Is this related ...
user avatar
  • 1
0 votes
1 answer
80 views

YouCompleteMe doesn't complete functions from headers

After downloading YouCompleteMe from ubuntu repositories and installing it I have used this script as extra config. I suppose this config may help me with in-headers functions auto-completion. :...
user avatar
1 vote
1 answer
46 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 ...
user avatar
  • 141
0 votes
1 answer
119 views

Change default tab behaviour for autocomplete to bash like tab

When I press tab for autocompletion (with the supertab plugin, but its applicable with vim's autocomplete feature as well), the selection scrolls from the bottom-most selection towards top with the ...
user avatar
8 votes
4 answers
1k views

Vertical WildMenu in Vim

One thing that really bothers me in vim (probably the only thing), is the wildmenu. In neovim, the wildmenu is vertical and looks as following: However, in vim, it is horizontal and looks like this: ...
user avatar
2 votes
0 answers
106 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 ...
user avatar
0 votes
0 answers
455 views

How do make autocompletion (Coc) work on Tab instead of Enter?

I use Coc-Python for Python autocompletions. It completes on Enter, however, I want to complete only on pressing Tab and reserve Enter for its normal behavior which is entering a new line. How do I do ...
user avatar
2 votes
1 answer
92 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 ...
user avatar
3 votes
1 answer
246 views

UltiSnips comment variable

VSCode have the following variables that are quite helpful when creating snippets: BLOCK_COMMENT_START Example output: in PHP /* or in HTML <!-- BLOCK_COMMENT_END Example output: in PHP */ or in ...
user avatar
2 votes
2 answers
79 views

Making functions react to keypress

Im very new to vim scripting. I have the following script in my .vimrc: If there is no user input aka I press <CR> => go to recent buffer If input is 'd' => delete all buffers except for ...
user avatar
  • 33
0 votes
1 answer
258 views

Moving up/down on autocomplete selection box without arrow keys

I'm currently using vim on VSCode (with the vscodevim extension). When VSCode serves me some autocomplete options, I always have to use the arrow keys ↓ and ↑, which are a bit of a stretch. Is there a ...
user avatar
0 votes
1 answer
339 views

Vimtex+YouComplteMe 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 ...
user avatar
1 vote
0 answers
600 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-...
user avatar
  • 131
0 votes
1 answer
22 views

"auto-complete" normal mode command?

Once I press g (or anything that enters operator pending mode), is there a way to see what keys could follow (e.g. gf, ga etc)? Alternatively, is there a way to search builtin + mapped keys by regex? ...
user avatar
  • 325
0 votes
2 answers
216 views

How to make neovim cmdline-completion suggests common matched substring?

I've installed vimspector. When I type :Vim in the command & hit tab, I get all matched autocomplete suggestion like VimspectorAbortInstall, VimspectorEval, Vim.... etc. I'm tired to iterate that ...
user avatar
0 votes
0 answers
588 views

Getting Rust Language Server to work with vim

I'm trying to get tab completion support for rust programs in vim going. There are many descriptions on the net how to this and none of them work out-of-the-box in my environment. The first major ...
user avatar
  • 337
2 votes
1 answer
61 views

How to Complete entire line containing keyword

I have hidden buffers and I'd like to be able to get an import from another file to place into a file. For example, if I were to have this in another buffer: import javafx.controls.Button; if I were ...
user avatar
  • 133
2 votes
2 answers
58 views

Sending two keys in series during autocompletion confirmation

I have the following mapping: inoremap <expr><CR> pumvisible() && complete_info().selected != -1? "\<C-y>" : "\<CR>" inoremap <expr><Space&...
user avatar
  • 143
0 votes
1 answer
781 views

Neovim: Select an autocomplete option with <tab> instead of <return>

In the example below, how do I use <tab> to select HttpResponse the item instead of <enter>? I'd like to make this change permanent. This is using Kite within vim in case it matters.
user avatar
2 votes
0 answers
25 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. ...
user avatar
  • 267
2 votes
0 answers
100 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 ...
user avatar
  • 1,124
6 votes
2 answers
382 views

Convert absolute path to one relative to another absolute one

Context I’m working on an 'omnifunc' function for Markdown editing. It’s supposed to help me link to other Markdown files while I’m typing a link – based on file content though, not file name. Suppose ...
user avatar
  • 163
0 votes
1 answer
592 views

Automatically place closing curly brace on new line

Mainstream editors usually place closing curly brace on the new line automatically while entering function bodies and conditional constructs in languages with curly braced syntactic blocks. Vim/Neovim ...
user avatar
2 votes
1 answer
77 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 ...
user avatar
  • 121
1 vote
1 answer
41 views

Select nothing when omni completion activated?

When omni completion activated,a menu pop up waiting to select,which key could i press if i want to select nothing in the menu and input whatever else?
user avatar
  • 820
0 votes
0 answers
29 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 ...
user avatar
0 votes
1 answer
132 views

How to prevent inserting a new line on using ctrl+n for autocomplete?

When I use CTRL+n to autocomplete words a newline is inserted when I select a word from the list by pressing ENTER. I don't want that, I want it to just insert the word and place the cursor at the end ...
user avatar
0 votes
0 answers
163 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 ...
user avatar
0 votes
0 answers
74 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 ...
user avatar
  • 163
1 vote
0 answers
260 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 ...
user avatar
  • 1,572

1
2 3 4 5
7