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
8 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
26 views

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

well on using Ctrl+n for autocomplete words the latter insert a newline 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 ...
0
votes
0answers
15 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
10 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
57 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
17 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
18 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
52 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
14 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 ...
1
vote
0answers
20 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
18 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
24 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
30 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
23 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
26 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 ...
1
vote
0answers
52 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
25 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
1answer
102 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
29 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
76 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#...
0
votes
1answer
47 views

<C-x><C-o> “Pattern not found” even with a Ctags file (C/C++)

<C-x><C-o> returns Pattern not found in C/C++ files even with a ctags file. It used to work and I haven't made any configuration/plugin changes that I know of Starting vim with vim -u ...
0
votes
0answers
18 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-...
0
votes
0answers
148 views

vim omni-complete and c++20

I have used vim for C++ development for quite a while now where, for auto completion, i would either use YCM or, lately, the combination of LanguageClient-neovim and clangd. Lately, however, having ...
0
votes
0answers
29 views

Auto-completion pop-up no clean up - how to debug

I'm trying to solve this issue for some time now. Quite often auto-suggestion pop-up leaves a text on the screen: even after being closed sometimes covering newer suggestion that was displayed after ...
0
votes
1answer
41 views

Put a tab autocompleted path into current buffer

I use autocompletion a lot, especially for long path names: e.g. $ /home/au/Doc<tab> <tab>uments/A<tab> <tab>\ file\ with\ a\ very\ long\ name This can be performed within ...
3
votes
2answers
84 views

Keep <C-X> <C-F> filename completion menu alive between directories

I'd like to use <C-X> <C-F> to autocomplete a long filename in insert mode, say /foo/bar/baz.txt. When I type in /f, I can press <C-X> <C-F> to complete to /foo/. However, ...
0
votes
2answers
26 views

Use the buffers auto completion in an input() dialogue

I am trying to add autocompletion, with suggestions from the currently edited buffer when reading input from the user for a search string: function! Testinput() return input("Enter search string: ...
0
votes
0answers
66 views

Unmap <c-n> / <c-p> in completion menu to use as previous / next snippet placeholder with Coc

My completion mappings scheme with coc is the following: <c-@> (ctrl-space): trigger the menu / use the selected item (or the first one) <c-j> and <c-k>: navigate the list (or also ...
3
votes
2answers
174 views

How to get auto completion provided by <C-N> without typing <C-N>?

I like the simple auto completion provided by Ctrl-N but not typing Ctrl-N everytime to get the completion. I would like it to work similar to how YouCompleteMe works with automatic suggestions. If ...
0
votes
0answers
217 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 = ...
2
votes
1answer
60 views

How to enable autocomplete for writing in English?

Is there a way to enable autocomplete for writing in English? For example, if I write giv, I want Vim to automatically suggest give, given, gives, giving, giveaway, etc. In Emacs, this is easy to ...
6
votes
2answers
262 views

Shell scripting: A more elegant way to complete then…fi, do…done, case…esac pairs?

The problem In shell scripting, conditionals and loops don't use curly braces to indicate blocks, but rather special keywords: if [ ... ]; then statements close with fi, while [ ... ]; do statements ...
1
vote
1answer
166 views

neovim ruby/rails omnicomplete

I'm trying to get omnicomplete working in neovim (0.3.4) on debian 10 with Ruby 2.6.6 (rbenv). I have these plugins: Plug 'vim-ruby/vim-ruby' " ruby ...
2
votes
1answer
63 views

How to make Vim autocomplete with file system?

Let's say I have my directory/file tree as follows: / |_home |_myPC |_script.sh |_test.sh |_etc |_log.txt I'm working on script.sh and Vim has nothing like firejail to stop it from ...
1
vote
2answers
51 views

How to auto-complete filenames in sub-directories when opening them for editing using e.g. `:e </path/to/file>`?

How to autocomplete filenames in sub-directories when opening them for editing using e.g. :e </path/to/file>? When opening files in sub-directories for editing using e.g. :e </path/to/file&...
1
vote
1answer
76 views

How to set a maximum popup window height for auto completion?

As title, when there're tens of suggestions, the popup can expand the entire window. How to set a maximum window height for auto completion popup? I'd like to have a scrolling window.
0
votes
1answer
87 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 ...
2
votes
1answer
32 views

Rails Vim tab completition for model and controller works different than for views

I'm using Vim with Rails Vim plugin. When trying to tab-complete command :Emodel U or :Econtroller U and then <Tab> it won't recognize the user.rb or user_controller.rb file. But works fine for :...
1
vote
0answers
41 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 ...
1
vote
1answer
35 views

how to get dictionary and thesaurus completion

<C-x><C-K> allows for dictionary completion, and <C-x><C-T> for thesaurus completion. How can I get both completions at once? Ideally, is there a way I can add the thesaurus ...
0
votes
1answer
37 views

:o autocomplete

Without any plugins, I am able to autocomplete :vsp filena<tab> I wonder why I don't get autocompletion of filenames with :o. I have tried this in different installations, terminals and OS.
1
vote
1answer
170 views

Completion pop-ups hijack arrow keys. Any way to disable that?

Regardless of which code completion plugin I use (I tried asyncomplete and YouCompleteMe), when there's a completion pop-up, up and down arrow keys select completion options in it instead of moving ...
3
votes
3answers
202 views

Easiest way to go to the closest closing bracket?

When I'm choosing an option from the autocomplete suggestions, it automatically puts my cursor in the following location: function(|) Then I type the value that I want, and in order to get out of ...
0
votes
0answers
53 views

Autocomplete hidden files

This same question has already been posted by a user who asked why this happened with the autocompletion of the :e[dit] command here. However, the accepted answer doesn't fully answer the question ...
0
votes
0answers
1k views

coc not working in latest vim

I've installed coc following the instruction, using Vim-Plug (before that I did it without installing yarn and with kite still (partially) installed. I got a 'javascript file not found' error So I ...
1
vote
2answers
126 views

C-N using try-catch

When using autocompletion with <C-n>, if no matching string is found, vim shows the message Pattern not found into the status bar. I tried something with this simple function: function! TestCN(...
2
votes
0answers
287 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 ...
1
vote
1answer
72 views

call omnicompletion from vimscript

I'd like to automatically call the omnicompletion (that is triggered manually by <Ctrl-X><Ctrl-O>) from within a vimscript function. I played around a bit with execute 'normal! …' and ...
3
votes
1answer
108 views

How to print a list of possible matches from C-n?

That is, doing autocompletition with C-n, is there a way to obtain the list of possible matches, same as returned into the popup menu ? Given the example below is it possible to retrieve {aaa, aaab, ...
1
vote
0answers
392 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 '...

1
2 3 4 5 6