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
1answer
10 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 ...
-2
votes
1answer
103 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 ...
0
votes
0answers
11 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 ...
0
votes
0answers
30 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 ...
1
vote
1answer
37 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 ...
0
votes
0answers
27 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
42 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
59 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?
0
votes
1answer
35 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....
0
votes
0answers
27 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 ...
0
votes
1answer
25 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. :...
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 ...
0
votes
1answer
50 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 ...
6
votes
3answers
289 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: ...
1
vote
0answers
54 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 ...
0
votes
0answers
77 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 ...
2
votes
1answer
52 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
1answer
97 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 ...
2
votes
2answers
66 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 ...
0
votes
1answer
95 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 ...
0
votes
0answers
57 views

Setting up Jedi Vim for the first time, are there some magic settings needed?

My problem is that I know vim only as well as I absolutely have to, and I think I may have gotten into trouble getting this jedi-vim to work... I use the following arch for my plugins: pathogen ...
0
votes
1answer
108 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 ...
1
vote
0answers
307 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-...
0
votes
1answer
16 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? ...
0
votes
2answers
80 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 ...
0
votes
0answers
336 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 ...
2
votes
1answer
46 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 ...
0
votes
1answer
26 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&...
0
votes
1answer
190 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.
0
votes
0answers
43 views

How to write a fast auto completion for font names?

I am new to Vim. I recently installed the YouCompleteme (YCM) plugin, and realized it would be great if I could complete font-names. Let's say I type fn:, it should bring up a popup menu to help me ...
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 ...
6
votes
2answers
203 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 ...
0
votes
1answer
285 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 ...
2
votes
1answer
63 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 ...
0
votes
0answers
25 views

Link a yaml file with a python file for auto completion

I have yaml files and python scripts. Is it possible to make one-one mapping between yaml and python files for auto completion? I have to define information in yaml files rather often and there are ...
1
vote
1answer
30 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?
0
votes
0answers
28 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 ...
0
votes
0answers
15 views

Indent line in xml after omni-completion

When editing xml, lines are indented when pressing (among others) <, > or <CR> according to the indentkeys setting. For example: <tag> </tag| If the cursor is on | and I ...
0
votes
1answer
73 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 ...
0
votes
0answers
102 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 ...
0
votes
0answers
60 views

How to make deoplete to support Typescript?

I'm using NeoVim v0.4.4 on Mac with deoplete. How can I configure it to support Typescript autocomplete?
0
votes
0answers
67 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 ...
1
vote
0answers
115 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 ...
0
votes
0answers
162 views

Making clangd LSP recognizing GNU-specific headers

I have coc.nvim installed for autocompletion in vim. I usually include bits/stdc++.h(GNU-specific) in my files for competitive programming. I use the g++ compiler so I have no trouble there, but since ...
0
votes
0answers
215 views

vim-pandoc bibliography completion works only when writing a new file with GVim

I have installed vim-pandoc, as suggested here. When I open Vim in the terminal I get only 'Omni completion (^O^N^P) Pattern not found' errors. echo pandoc#bibliographies#Find_Bibliographies() returns ...
0
votes
0answers
197 views

omnifunc with ctags for C struct members

I'm trying to setup Vim to use ctags to autocomplete struct members when I press C-x C-o, but I get Pattern not found error. I tried both with . and ->. Vim can find tags file because I can jump to ...
2
votes
1answer
78 views

Hidden files and folders are hidden / ignored in wildmenu

As mentioned, when using <TAB> completion, hidden files do not show up. E.g. :e <TAB> only shows non-hidden files. :verbose set wildignore? wildignore= A similar question is here, while ...
0
votes
0answers
34 views

How to store entries of complete menu and omnicomplete menu in variables without triggering the popup menu?

Is there a way to store the results of <C-N> or <C-X><C-O> from the insert mode in a string or list variable without triggering the respective popup menus to display onscreen? For ...
1
vote
1answer
52 views

Get autocompletion of script names in $PATH

I would like to know how I could set up script names auto completion in vim ? For example let's say I have myscript.sh in ~/bin and ~/bin is in my $PATH, I would like to type mys in vim and get auto ...

1
2 3 4 5
7