Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [autocompletion]

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

-1
votes
1answer
26 views

ctrl-n - should not insert text

When I am using the ctrl-n functionality (autocomplete word), it just inserts the text. I do not want to do that, instead, I would want to choose a word from the dropdown list, which I may then want ...
0
votes
0answers
37 views

Show file path in autocomplete popup for tags

In autocomplete popup I see all the tags when I type CTRL-N in insert mode. I would like to see filepath/filename on the right side of the popup. Any pointers? Edit1: Once I type a php class like: "$...
2
votes
0answers
19 views

Make <Esc> close completion menu and cancel selection, without side effects

I would like to make my Vim completion menu a little more IDE-like, and I was able to achieve this using the bindings suggested here. However, the <Esc> binding causes a bit of a problem: ...
2
votes
0answers
15 views

How to omit dictionary source file in dictionary completion

<C-X><C-K> complete words with long dictionary file name, such as /home/xxx/.vim/mydict. I'd like to omit or shorten the descriptive info. I have googled but got no hints. Any advice?
2
votes
1answer
51 views

Cycle through autocomplete menu using tab

I am activating my autocomplete menu in vim using: inoremap <C-@> <C-n> and after it opened and only when it opened I would like to use the "tab" key to cycle through the menu. But when ...
0
votes
1answer
51 views

Integrating autocomplete and snippets

I'm trying to set up an autocompletion/snippet workflow that's a bit complicated. This is stemming from needing a better workflow for latex. Right now I'm using coc.nvim and UltiSnippets but I am ...
2
votes
0answers
28 views

Omni completion Pattern not found - Error loading rails environment

I'm trying to make Omni completion work with my Ruby files, but it only works with Ruby's core libraries; for instance, after typing String.<C-X><C-O> i get all Ruby's String methods, ...
0
votes
0answers
34 views

How can I get the autocompletion databases on VIM using YouCompleteMe?

I just wanted to add the completion functionality on vim. For that reason, I went for YouCompleteMe plugin. It worked well with the following configuration on my .vimrc file: execute pathogen#infect()...
1
vote
0answers
19 views

Is it possible to have auto suggestion of schema names?

(tag suggestions welcome) I've just started learning Vim. My other text editor, which I use for writing Hive queries is a browser based editor which has this very useful feature of auto suggesting ...
0
votes
0answers
24 views

Fuzzy / smart / intellisense completion in input mode

Standard Vim completion supposes that you type in the beginning of the word, then press CTRL-N, and get all the words that begin with the prefix you typed in. In my situation, prefixes are mostly the ...
2
votes
1answer
38 views

file name completion in .gitignore

I often "unignore" files in .gitignore, like this: * !.gitignore !file.txt !dir !dir/* Can I modify the pattern for which insert mode file name completion would work? In this case, instead of ./ I'd ...
0
votes
1answer
37 views

How to navigate in auto completion menu, when arrows are disabled in .vimrc

Reason for my question: It's not the first time I have cancelled my arrow keys in vim, and the improvments in my typing is again tremendous. I wish to keep arrow keys non effective inside vim. ...
1
vote
0answers
106 views

autocompletion - How to add phrases as thesaurus synonyms

I have a thesaurus file which contains synonyms for the word iterate. I would like to add an alternative phrase for iterate like loop over so I added it to the thesaurus. Unfortunately, this doesn't ...
1
vote
1answer
99 views

`q` does not record tab completion correctly

Whenever I want to record complex macro between qa and q, I have to remember that, for instance, I can't use Tab-completion while type some ex command, otherwise the macro will not work. Have I ...
1
vote
1answer
58 views

Supertab inserts tabulation instead of autocompleting

I have supertab installed alongside with vim-go. Next, I'd like to have autocomplete when writing in Go, but when I press tab its literally inserts a tab character instead of showing the autocomplete ...
0
votes
1answer
27 views

non-word characters in tags

I have tags (generated with ctag) of the form eq:local-canonical-form Now: because of the : I cannot use eq:loc<c-x><c-]> to expand the tag. because of the : and the - I cannot use <...
2
votes
0answers
53 views

vim recorded session like doitlive

I have a presentation to make for a conference and I'm not allowed to use slides, only live coding. Is there a tool in vim which will help me avoid typos ? :) Something like doitlive which you can ...
1
vote
0answers
44 views

How to get html tag auto completion?

I can't seem to figure out how to implement auto tag completion for html. Is there a plug-in or something else you guys use that works? Is there just one thing I can download that will handle ...
3
votes
2answers
183 views

Easiest way to insert LaTeX matrix?

Recently I found myself in a situation that need to type in quite a number of matrices to LaTeX by hand, so I was wondering if there are some tools that can help me to save some keystrokes. The ...
1
vote
1answer
82 views

customize Ex command completion

vim provides a nice way to complete the Ex commands, which uses the -complete=custom,Func or complete=customlist,Func. It also provides many predefined completion methods such as -complete=dir. Is is ...
2
votes
1answer
63 views

Unable to repeat comment string for new line

Vim has the option to automatically continue comments when a new line is entered as described here. This currently works perfectly for // and # in .cpp and .python files respectively. I tried to add ...
0
votes
1answer
70 views

Is it possible to type “return + shift” to insert a new line in deoplete?

Here is a situation. I use deoplete but since the pop-up menu when I type in something already puts the cursor at the first item on the list, when I type in return, it inserts a new line. So I want ...
1
vote
0answers
53 views

remap keybinding for vim gocode autocomplete feature? (remap keybinding in insert mode) [duplicate]

So I installed vim-go and gocode and Blackrush/vim-gocode.git (the latter because I use pathogen). So far so good! I am fine, I can type <C-x><C-o> in insert mode and I get completion ...
1
vote
1answer
183 views

Question about autocompletion in Vim editor and html document

Why does one of Vim's autocomplete functions (ctrl+n) not work in html documents, while the other (ctrl+p) still does?
1
vote
0answers
255 views

How to automate Vim's native auto-completion with a drop-down menu?

I know there is a ton of plugins and topics that discussing about auto-completion things in Vim! I just need the Vim's native auto-completion to be automated! auto-suggestion words, etc from ...
7
votes
3answers
165 views

Return from command autocomplete

If I type :e foo/**/foo*.js and hit tab then vim replaces the *s with all possible suggestions in the filepath. What if I realized that I wasn't specific enough (there are too many results in ...
0
votes
2answers
196 views

How to enable dictionary autocompletion without spell option set

I noticed, that in any source code file, regardless of the programming language, I can use the dictionary autocompletion (Ctrl + x Ctrl+k) if the spell option is set, if it's not, then the editor ...
3
votes
1answer
53 views

Close particular buffer immediately upon leaving it

I have a really large file with many paths in it. I don't want it to participate in any of the completion mechanisms. Is there a way to mark a particular buffer as "not a candidate for keyword ...
0
votes
1answer
32 views

Why can't complete month in txt file?

Part of setting in my .vimrc. cat .vimrc autocmd FileType txt setlocal omnifunc=CompleteMonths fun! CompleteMonths(findstart, base) if a:findstart " locate the start of the word let line = ...
1
vote
1answer
135 views

pythoncomplete can't complete python's build-in functions?

filetype plugin on autocmd FileType python set omnifunc=pythoncomplete#Complete I found that pythoncomplete can't complete python's build-in functions. vim test.py import os os. #Now the complete ...
0
votes
1answer
69 views

Auto activate autocompletion

I would like to have autocompletion active on its own like on sublime text without doing Ctrl+n. I would like to have this without any none native plugins as the already existing autocompletion in ...
0
votes
2answers
146 views

How to call both javascript and php complete in editing html file with vim?

I have installed tern_for_vim and setted complete in .vimrc. autocmd FileType javascript setlocal omnifunc=tern#Complete autocmd FileType php set omnifunc=phpcomplete#CompletePHP Now i can call ...
2
votes
0answers
333 views

Why — ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) Pattern not found?

vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 30 2017 18:21:38) Included patches: 1-197, 322, 377-378, 550, 703, 706-707 Modified by pkg-vim-maintainers@lists.alioth.debian.org ...
2
votes
1answer
282 views

Is it possible to put the cursor on the first item on auto-completion?

I added and use deoplete to get a list of completion while typing. However, typing in a word shows the completion list with the cursor being nowhere on the list. On some IDEs like Xcode, when you ...
1
vote
1answer
75 views

Using getcompletion function for insert mode autocompletion

I recently became aware of the getcompletion function which can return autocompletion options for a variety of different things (shell commands, vim autocommand events, files, etc.). Many of the ...
1
vote
0answers
140 views

Issues with autocomplete in vim8

I have installed two vim plugins javacomplete2 and vim-emoji successfully but I'm not able to use their auto-prompting feature which enables the user to select an autocomplete suggestion without ...
3
votes
1answer
73 views

What is the difference between set complete+=t and set complete+=k in vim?

In this wikia tip I found set complete+=k and set complete+=t. I applied both but only the first one worked. My question is what is the difference between these?
0
votes
0answers
17 views

How to configure autocompletion so that it replaces everything until non-word-char?

I'm using CTRL + n to do auto-completion when editing - since years. One things that annoys me (and now I want the solution) is that the completion is not replaced characters until the next non-...
0
votes
1answer
128 views

Confirm selection among options

When searching for autocompletion on any command via Tab, now vim shows me a list of the available options: I was used to push the right-arrow -> in order to select an option while navigating them ...
2
votes
1answer
464 views

autocompletion with node, visual studio style

There isn't much from VS Code I can't reproduce with neovim but working with javascript/node, I am quite jealous of the fact that the autocompletion works with any (or most?) libraries added to the ...
2
votes
3answers
201 views

Auto-complete popup menu: make Enter trigger newline if no item was selected

I like using the <CR> key to confirm my selection in the popup menu. However I don't like the <CR> key doing absolutely nothing when no item was selected in the menu -- in this case, it ...
4
votes
0answers
478 views

vim compiled with python3 but python3 omni-completion does not work

It used to work when I used python2, but now I can't use ^X^O to complete function names. I do have vim with -python and +python3 (on Ubuntu 16.04), but here is the error I get when trying Ctrl-X ...
1
vote
1answer
147 views

Multiword completion (CTRL-X CTRL-P) to end of line

In insert mode, CTRL-P autocompletes a word from earlier in the buffer. A subsequent CTRL-X CTRL-P will insert the word that followed that word. canFail :: Either Error Success canAlsoFail :: Ei█ ...
5
votes
1answer
1k views

Completion suggestions while typing

I use Vim a lot for writing tasks and I used ^p for completions. However, is there a plugin that suggests you completions while typing like in Andriod-smartphones ? Thanks.
1
vote
1answer
196 views

Remapping return key to <C-p>

Because I am used to autocompleting by pressing the return/enter key, I want to remap the return key to Ctrl-p in insert mode. However, I only want to remap it when the cursor is directly behind a ...
1
vote
0answers
56 views

Fish-like autosuggestions depending on 'completeopt'

I describe this as Fish-like as it is referenced as such by zsh-autocomplete, and I would define it as follows: The appearance of a (temporary) automatically inserted completion match, that is ...
4
votes
1answer
152 views

Completion Function Return Value -1 Cancellation

From the vim documentation FUNCTIONS FOR FINDING COMPLETIONS *complete-functions* This applies to 'completefunc' and 'omnifunc'. The function is called in two different ways: - First the ...
1
vote
0answers
323 views

asyncomplete.vim: how can I automatically show the completion menu after two succeeding 'word'-characters?

I'm trying to configure asyncomplete.vim so that the completion menu is shown when inserting at least two succeeding 'word'-characters. However, I'm having trouble understanding why asyncomplete#...
3
votes
0answers
105 views

gvim Linux - autocomplete plugin - enable / disable depending if the user is typing or not

I am using the autocomplete and I feel quite comfortable with it because it's minimalistic and simple. But there is just a thing I dislike: sometimes it interferes with the mouse scrolling auto-...
2
votes
0answers
48 views

Filename completion without suffix

By using suffixesadd I can navigate modules without file extensions. However, when I import modules by using path completion(<C-X><C-F>) the file extensions do not get omitted. Are there ...