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
0answers
13 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
12 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
24 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
35 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 ...
4
votes
1answer
84 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
47 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
24 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 ...
1
vote
0answers
27 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
62 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
65 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
55 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
29 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
61 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 ...
0
votes
0answers
158 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
15 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
49 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
227 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
43 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
25 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&...
-1
votes
1answer
87 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
41 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
18 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
92 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
149 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
161 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
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 ...
0
votes
0answers
23 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
26 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
27 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
59 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
79 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
50 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
64 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
72 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
140 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
157 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
141 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
0answers
40 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
30 views

Use autocompletion options from terminal buffer in editor buffer

I typically work with a text editor combined with a REPL terminal, and I send text from the editor to the terminal. For example, I use two side-by-side buffers, one for editing text, and one with a ...
0
votes
0answers
28 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
48 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
vote
1answer
30 views

line-completion based on non-initial substring

Is there a way to perform a completion similar to <c-x><c-l>, but completes lines based on an arbitrary substring rather than a leading prefix of the line? I'm especially interested in a ...
1
vote
1answer
439 views

:set completeopt=menuone does not always show menu on the commandline

:set completeopt=menuone does not always show the menu. For example pressing :vs<tab> on the command line one would expect the menu to appear, with the singular option vsplit. What happens ...
2
votes
1answer
114 views

Why use coc and not only the single plugins providing code completion for a language?

I'm trying to wrap my head around the necessity of the coc plugin, since if I have it installed it still needs the coc-vimtex plugin for LaTeX support (which I get is necessary since not all languages ...
1
vote
0answers
239 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
1answer
166 views

Code snippet completion for vim in C++

I have YouCompleteMe installed; however that only complete certain words or phrases. I am looking for something similar in VSCode or Emacs' Yasnippet. For example, if I type if, then press Tab, then ...
0
votes
2answers
441 views

How to Keep Syntax Color but Disable Highlighting in Vim?

I recently activated auto-complete using YouCompleteMe and syntax color in Vim. However, a red highlighting color appeared. I tried to disable syntax color with syntax off, but this highlighting ...
1
vote
1answer
31 views

Is it possible to use word completion (e.g. `Ctrl-N`) in Ex mode?

I want to use word completion in Ex mode, similar to using Ctrl-N in Insert mode to complete the current word. Suppose, I want to do a substitution: :%s/<pattern>/<replacement>/gc. If the ...
3
votes
1answer
103 views

How does ft-c-omni work and how can I make it faster?

As I was studying the various ways of doing completion in Vim 8.0, I came across the very interesting "omni-completion" feature and its 'omnifunc' option, which is specialized as ccomplete#...

1
2 3 4 5 6