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
1 answer
481 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 ...
's user avatar
0 votes
2 answers
485 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 ...
  • 880
2 votes
0 answers
2k 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 ...
  • 91
4 votes
1 answer
1k 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 ...
  • 487
1 vote
1 answer
138 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
0 answers
265 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 ...
2 votes
1 answer
728 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?
  • 55
0 votes
0 answers
19 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-...
4 votes
1 answer
999 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 ...
  • 143
4 votes
2 answers
2k views

Autocompletion with NodeJS, 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 ...
  • 256
3 votes
4 answers
2k 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 ...
  • 1,257
5 votes
0 answers
840 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
1 answer
378 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█ ...
  • 1,210
6 votes
1 answer
3k 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
1 answer
668 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 ...
  • 205
1 vote
0 answers
93 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 ...
  • 275
3 votes
1 answer
231 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
0 answers
760 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#...
  • 275
2 votes
0 answers
210 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-...
  • 354
2 votes
0 answers
79 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 ...
  • 189
3 votes
2 answers
3k 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 ...
  • 55
1 vote
2 answers
179 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?
  • 4,080
0 votes
1 answer
316 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 ...
  • 131
2 votes
1 answer
912 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: ...
  • 440
1 vote
1 answer
364 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
1 answer
498 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
1 answer
254 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
1 answer
29 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 ...
  • 13
0 votes
1 answer
405 views

Get list of javascript functions in file

The functionality that I am after, is to get a list of the javascript functions present in the file that I am in. Clicking a function in the list will then take me to that function. How do I go about ...
0 votes
0 answers
75 views

Use quickfix for completion

Is there a way to use QuickFix as a source for auto-completion? Let me explain, my experiments with project-wide autocompletion did not end with any successful results and I tried every plugin ...
  • 2,252
1 vote
2 answers
467 views

User command with modified 'path' completion?

I'm trying to write a wrapper command around :edit or :find specifically to open either my vimrc or a subpath of ~/.vim/ (e.g. ~.vim/autoloads/foo.vim). If I run the command with no arguments, it ...
  • 1,210
9 votes
2 answers
3k views

How to select a matched autocompletion item

I want to select the 6th item (here readImage) in the auto-completion items. The normal way i knew is pressing ctrln for 6 times until the matched word is selected and then press enter. I tried ...
  • 880
2 votes
2 answers
288 views

Unusual Vim Auto-completion Feature

Usually, in Vim, pressing <TAB> autocompletes a command. For example, typing :set <TAB> will autocomplete to :set all. Pressing <TAB> again will autocomplete to :set termcap. ...
0 votes
1 answer
128 views

Does vim have functionality for completetion of methods/variables with punctuation?

In Ruby, and languages based on Ruby the style-guide recommends bool getter methods be named empty? as opposed to is_empty. Note the question mark. Vim however, does not complete the ? by default. Is ...
  • 171
4 votes
2 answers
537 views

How to trigger <tab> auto completion in a key mapping?

I'd like to map Leader+e in normal mode to showing the auto completions of files to edit. I tried nnoremap <leader>e :e<space><tab>, but it shows :e ^I, where the tab gets rendered ...
  • 381
35 votes
1 answer
16k views

Is there any way to change the popup menu color?

Is there any way to change the background color of the popup menu in gvim? The default background color is pink, which is a little weird to me.
  • 453
2 votes
0 answers
260 views

Comprehesive support for graphviz (linting/autocompletion/snippets)

Vim comes with some support (syntax highlighting) out of the box for the DOT language (graphviz) In addition, I found the plugin: https://github.com/wannesm/wmgraphviz.vim, which provides integrated ...
1 vote
0 answers
445 views

How do I get vim to autocomplete correctly for :! on Windows?

On Vim 7.3 on Windows, if I use Tab to autocomplete paths with nonstandard characters in many cases, it works fine. For example: :n 2016\ Posts\\feb\something.txt If I press Tab after '2' and 'f' ...
3 votes
1 answer
1k views

Change keybinding for up/down when in vim popup

I'm using deoplete plugin for auto completion. In Vim, default keybinding for up and down when popup appears is CtrlN / CtrlP. I want to change to CtrlJ / CtrlK for same behavior with CtrlP plugin. ...
  • 183
2 votes
2 answers
3k views

Autocompletion Plugin for VIM without external requirements

I am searching a Plugin for autocompletion which does not have any requirements to lua ruby or python. I would love to use YouCompleteMe but it requires python, which is not availiable on my server. ...
  • 123
2 votes
0 answers
108 views

No omnicompletion in Vim for python

So I got YouCompleteMe working for python autocompletion. Whenever I use a . operator such as: import sys sys. It shows the correct suggestions. Note that I didn't have to hit CtrlSpace. But when I ...
's user avatar
1 vote
0 answers
286 views

Emulate Emacs' "auto-fill-mode" [duplicate]

According to the Emacs tutorial: Type M-x auto-fill-mode now. Then insert a line of "asdf " over again until you see it divide into two lines. You must put in spaces between them ...
4 votes
5 answers
4k views

autocompletion in command line/search

There is some way to "extend" autocomplete functionality (like that one supplied by SuperTab plugin) to be used in command line mode so I would autocomplete when searching a text with / command? ...
3 votes
1 answer
2k views

What's the difference between :open, :visual, and :edit?

I'm somewhat new to vim (read: really new). I'm used to vi-keys for moving and I understand the concept of operators vs motions vs commands and whatnot, but I'm still learning the commands. When I ...
's user avatar
4 votes
1 answer
252 views

How to populate a drop-down list for <C-x><C-i> completion?

I use Static Site Generator | Nikola. Each post has a header like as follows: <!-- .. title: Some interesting title .. slug: some-interesting-title .. date: 2017-01-25 06:32:15 UTC-03:00 .. tags: ...
  • 295
1 vote
2 answers
242 views

vim plugin to autocomplete blocks in django templates but *not* a generic snippets plugin?

Copying this question over from https://stackoverflow.com/q/42474604/262108I recently started working with django templates and was wondering whether there are any autocompletion plugins for template ...
  • 167
9 votes
3 answers
9k views

Is there a version of Vim or plugin with a Command Mode auto completion?

I'm wanting to learn Vim, but think it's probably too daunting. I imagine learning enough to become powerful with it, then forgetting 99% after I'm on a computerless project for a while. I know just ...
  • 347
3 votes
1 answer
753 views

Can I use the mouse scroll wheel to browse the auto-completion popup menu?

Is is possible to use <ScrollWheelUp> and <ScrollWheelDown> while the auto-complete popup is open? I tried using the map inoremap <expr> <ScrollWheelUp> pumvisible() ? "<Up&...
  • 1,257
3 votes
1 answer
927 views

Disable case sensitive auto-completion, while "smartcase" search is enabled?

I like the behavior of smartcase while searching, and I like Vim's auto-completion options, but I don't like them together. Is there any way to keep smartcase enabled, but have auto-completion results ...
  • 1,257
19 votes
1 answer
5k views

Ctrl-n completion takes a long time for “scanning included file”

I'm brushing up on my vim skills and fiddling with completion using the Ctrl-n command. I'm programming in Perl. When I am in insert mode and hit Ctrl-n, I get a message that it is "Scanning included ...
  • 1,277

1 2 3
4
5
7