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
2
votes
0answers
71 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 ...
2
votes
2answers
2k 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
173 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
289 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
708 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
314 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
479 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
214 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
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 ...
0
votes
1answer
353 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
0answers
66 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 ...
1
vote
2answers
386 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 ...
8
votes
2answers
2k 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 ...
2
votes
2answers
245 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
1answer
121 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 ...
4
votes
2answers
408 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 ...
27
votes
1answer
12k 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.
2
votes
0answers
224 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
0answers
407 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
1answer
968 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. ...
2
votes
2answers
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. ...
2
votes
0answers
102 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 ...
1
vote
0answers
274 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
4answers
2k 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? ...
2
votes
1answer
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 ...
4
votes
1answer
238 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: ...
1
vote
2answers
222 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 ...
8
votes
1answer
7k 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 ...
3
votes
1answer
664 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&...
3
votes
1answer
802 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 ...
17
votes
1answer
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 ...
0
votes
2answers
825 views

How to get Youcompleteme to work with Vimscript?

I've switched from NeoComplete to YouCompleteMe because it has much better intellisense, though I had NeoComplete working much better with Omnicompletion. NeoComplete was able to automatically ...
2
votes
1answer
427 views

autocomplete without typing first character

When typing LaTeX one often needs to type a \ to invoke a command such as \omega. One of the nicer features of LaTeX is the ability to define your own commands, which can then be detected by Vim if '...
7
votes
1answer
183 views

When using the dictionary feature in vim, can you make dashes a matching part of a word?

The dictionary feature in vim allows you to use a file (for instance /usr/share/dict/words) and set multiple paths within the dict option to search on. Now the file I'm searching on has several ...
4
votes
1answer
637 views

Thesaurus Option is empty?

I recently started looking at completions, and it says in the help if I am in insert mode and press CTRL+X CTRL+T I should be able to bring up a thesaurus of other words in a drop-down completion, but ...
0
votes
1answer
3k views

<C-space> does nothing in YouCompleteMe

I'm on my 4th clean install of YouCompleteMe. I am trying to get to work with a Python file after a . (such as foo....Then I hit <C-space> and would hope to see a list of options to complete ...
2
votes
2answers
756 views

What's the correct way to use pair completion?

I've disabled pair completion because it doesn't really save any key presses. I have to press right arrow to get out of a quote after completing the string. Am I missing something here? For example: ...
0
votes
1answer
2k views

<Tab> in insert mode brings up completion

Today when I open my computer and enter vi, strange things happened: backspace not working(solved), and Tab brings up keyword completion in insert mode, which is what I'm worrying about. Before, I can ...
2
votes
1answer
3k views

Deoplete with Neovim doesn't work

I have a problem with my deoplete plugin. When I write code, I don't have automatic completion on dot. I need to manually press <c-x><c-o> to make it work. Here is my deoplete ...
11
votes
1answer
2k views

cancel complete

Usually insert mode completion (<C-n>) inserts the right word the first time I press <C-n>, but not always. Therefore, I would like Vim to insert the match it deems best when I press <C-...
5
votes
1answer
695 views

Add closing parenthesis when completing function (omnicomplete)

I can complete functions with omnicomplete using c-x c-o but it only adds the opening parenthesis, is it possible to make it add the closing parenthesis and put my cursor between them? Seems ...
8
votes
1answer
876 views

Filename Completion with Spaces

I have a lot of files that have spaces in their names, and this is giving me problems. If I try to do command line completion for the find command, and one of these files come up, Vim will find it, ...
-1
votes
2answers
2k views

bypassing TAB auto-complete

Sometimes I need to press TAB, but instead of getting actual the tab key, a suggestion pops up and TAB cycles through the suggestions. How can I insert TAB without invoking the auto-completion ? The ...
1
vote
2answers
597 views

Vim buffer name autocompletion not working after first directory

I have a problem with Vim Autocompletion behavior for buffer names. Target Soft/OS I'm using gVim without plugins on Windows 10 What I would like to do Assuming we have a file tree like : +---- ...
1
vote
0answers
485 views

vim c++ clang_complete doesn't work for std::cin.get()

I'm using vim to do c++ projects on Mac OS X. To auto complete, I use this plugin: clang_complete For most of cases, such as members of user-defined classes, members of namespaces, it works very ...
3
votes
1answer
1k views

set completeopt=noinsert fails

I use the auto complete function from this stackoverflow page. It works fine on my pc and notebook but it fails on my raspberry pi with this error: line 28: E474: Invalid argument: completeopt=menu,...
1
vote
1answer
90 views

Get all syntax elements with some group name from buffer

In my syntax file I have something like syn match cleanReal "[+-~]\?\<\d\+\.\d+\(E[+-~]\?\d+\)\?" display hi def link cleanReal Float Is there a way to get all strings that are matched as ...
3
votes
2answers
208 views

Is there a way to use ignore case only for autocompletion in insert mode?

I know I can :set ignorecase smartcase to get autompletion to be case-insensitive but this has the side-effect of making all searches case-insensitive unless they contain an uppercase character. I ...
3
votes
1answer
2k views

How to write a `completefunc`/`omnifunc` that tries multiple base values?

I've been trying to write a simple complete function for Vim that tries multiple values for the base argument. Here is a version that works but which I find unsatisfactory: function! CompleteFunc(...
3
votes
2answers
2k views

Vim omnicomplete with Ruby 2.3.1

I've recently learned about Vim's omnicompletion and while attempting to make it work, I get the error Pattern not found. To test it I used the following code: class C def hello puts "Hello, ...

1 2 3
4
5
7