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.

0
votes
0answers
19 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
37 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
28 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
66 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
95 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
44 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
25 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
49 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
38 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
148 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
76 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
60 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
57 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
36 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
139 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
205 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
154 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
131 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
90 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
66 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
100 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
285 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 ...
0
votes
0answers
50 views

Supertab + merlin bizarre flickering interaction

I'm having an annoying problem with flicker under the Terminal app on OS X when using supertab and merlin together. (Using Vim 8.0 just for the sake of completeness). This problem presents itself when ...
1
vote
1answer
233 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
69 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
130 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
65 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
89 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
421 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
142 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
447 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
131 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
905 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
148 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
52 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
140 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
278 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
102 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 ...
1
vote
1answer
704 views

Remapping tab key to autocomplete in commandline mode in Vim

I am using Vim 7.4 and I wish to map the tab key so I can use new combinations to autocomplete arguments in command mode from the current directory Contents of current directory: Funwithstrings.cs ...
1
vote
2answers
128 views

Tab completion for filetypes in the commandline

If I want to set the filetype manually in vim, I would like to tab complete filetypes vim recognizes. However, right now vim just inserts a literal ^I :set ft=markd^I Is this possible?
0
votes
1answer
136 views

Vim crashes when using autocomplete

Some of the times I use YouCompleteMe, Vim 'half-crashes': I cannot continue coding in the current tab, but switching tab and coming back solves the issue. The autocompletion works about 80% of the ...
2
votes
1answer
265 views

How to set -complete=customlist behavior?

Case A user defined command to open files recursively in a directory. The command After weeks trying to get this to work, I got to the following code after trying to understand this answer: ...
1
vote
1answer
140 views

Map autocomplete word in normal mode?

I want to map , in normal mode to function as autocompleting a word <c-n> in insert mode. Also, I want to keep pressing , in normal mode to cycle through the list and then finally when I finish ...
0
votes
1answer
205 views

Autocomplete behavior in vim

I have autocomplpop plugin installed in my .vim directory. If I use gvim then autocompleting simply works automatically in insert mode without the need to press any CTRL-N to get the drop down list. ...
1
vote
1answer
105 views

Store vim external command result lines into a VimL array, to make a little custom autocomplete

This little snippet aims to make a little autocomplete script in VimL. the first code: cat % | grep function | sed 's/(/ /g' | awk '{print $3}' list all the method inside a php class. For example ...
1
vote
1answer
22 views

Fields in templates without resorting to commented-out lists (aka are drop-down options possible?)

I do a lot of work in plain TeX and XeTeX, editing the documents in vim, and have a variety of templates which I use to make the process more efficient. As you might expect, these use quite a lot of ...