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
4
votes
2answers
3k views

Pop up auto-complete suggestion automatically?

Auto-complete window can be pop-ed up when I use <C-N>, could I set it to pop up automatically when input keyword exceeds some length (3 characters)? YCM can do this but I don't want to install ...
9
votes
2answers
268 views

Is there a way to disable the foldexpr during autocomplete?

I've noticed that vim's fold method affects the efficiency of autocomplete, e.g. C-N is slow, and C-X L is hideously slow in medium sized files with relatively expensive foldexprs. I can't see the ...
0
votes
0answers
53 views

Create project specific mappings and abbreviations [duplicate]

When I'm working in a project it would be useful to be able to set some abbreviations / mappings that are specific only to that project. I know that I can have file specific mappings in ~/.vim/after/...
2
votes
1answer
122 views

Complete multiple lines

I want to complete multiple lines at once. For instance, in a buffer (may be hidden): ... using std::cout; using std::cin; using std::endl; ... In the current buffer I can complete a whole line ...
5
votes
2answers
139 views

How do I get filename completion to ignore a leading `=`?

Occasionally, when writing shell scripts and such, I have entries of the form: foo=/bar/baz To get filename completion (<C-x> <C-f>) to work, I have to put a space after the =, and then ...
1
vote
1answer
57 views

Can I search in the list of available completions on commandline?

I have set some options to configure completion on the command line, for commands that support it. I use the completion on the commandline very often with the :help command; That will be my example, ...
1
vote
0answers
299 views

Problem using LaTex .bib file with UltiSnips completion

Environment Ubuntu 14.04 Vim 7 Tmux I'm just trying to create some snippets for UltiSnips and writing bib files. What I want To create custom snippets that will make writing bib files (that I can'...
9
votes
1answer
698 views

How can I limit number of suggestions when using YouCompleteMe?

I'm working on fairly large php codebase (~1.3 mil lines of code). I have generated tags and now when I'm typing something like $data-> YouCompleteMe lags really hard and basically freezes Vim ...
5
votes
1answer
2k views

Triggering UltiSnips with enter

Is there any possible way to do expand trigger in UltiSnips with enter? I've tried <Enter>, <Return>, and <CR>. It works to trigger but doesn't work for new line. And I've tried to &...
7
votes
3answers
852 views

How to set up tags for Ruby, SASS, Slim and Coffescript?

I am developing main in Rails using SASS, Slim and Coffeescript. I have Exuberant Ctags installed and using tpope's setup It kind of works so at least I can move around my ruby code. But I would ...
2
votes
1answer
136 views

One pop up menu with keyword and user defined completion

Is there a way to mix user defined completion and keyword completion in one menu triggered by <c-n>? Keyword completion is probably the most useful method, but syntax completion triggered by &...
1
vote
1answer
37 views

Cycle between keyword & user defined completion with C-N

I use the following mapping to initiate keyword completion, followed by user defined completion: inoremap <expr> <c-n> pumvisible() ? "\<c-x>\<c-o>" : "\<c-n>" How can ...
5
votes
2answers
4k views

YouCompleteMe in non-code files yields — User defined completion (^U^N^P) Pattern not found

I use YouCompleteMe and it works great (after some setting up woes) for both C/C++ and Python code. However, it tries to complete things in text files such as ReStructured text, markdown, etc... The ...
15
votes
1answer
2k views

How do I exclude certain file extensions from completion?

Is there a way to configure vim regarding what file types it considers "suitable" for opening? Let me clarify by an example. Imagine you are working on a latex document. Once you build your file, you ...
27
votes
6answers
18k views

Vim Code Completion for Python 3

I am running Debian Jessie and use the current vim-nox (with +python -python3). I am having a hard time trying to program in Python 3, as I struggle with Python 3 code completion. YouCompleteMe doesn'...
13
votes
2answers
3k views

How can I lookup LaTeX symbols in Vim?

Can I integrate some form of symbol completion to Vim? Dedicated TeX editors like TeXMaker provide a list of symbols for completion (for example, \al shows a list with \alpha, \la shows \lambda and \...
5
votes
4answers
907 views

How do I make dictionary completion look in a different file if triggered after the @ sign?

I have been using Vim as a research database, and I use tags in the form of @tag for each note, written in the second line after the title. I might have more than one tag. How can I make dictionary ...
5
votes
1answer
802 views

Including dictionary terms with spaces

We can use dictionaries to help us complete keywords. To set a new dictionary you can use set dictionary+=path/to/dict. This way you will be able to complete from a dictionary by typing <C-x><...
13
votes
1answer
735 views

Ins-completion of WORDs

<C-p> and <C-n> allow the completion of words found within the current document. I am taking some notes and writing say {0,1}^n and (E,D) many times. These are WORDs constituted by ...
5
votes
1answer
245 views

How to make `C-x C-k` dictionary completion respect case?

Vim has excellent inbuilt autocompletions. I've noticed that using C-x C-k (see :h i_CTRL-X_CTRL-K for more) for dictionary completion will not respect the case by default. For instance, if I type ...
6
votes
1answer
76 views

Tab to complete filenames with :find at an arbitrary depth

Notes: I have set path=$PWD/** in my .vimrc I am using Vim 7.3 Often times, I am sitting with Vim open at the root of my project and I enter :find somef<Tab> to find and open a file at an ...
11
votes
2answers
2k views

Zsh-like tab completion of partial paths

Related to Bash-like partial tab-complete for filenames in Vim One of the truly fantastic features of zsh is that you can type, for example, ls /u/s/m/m/who.1, press Tab and have it complete to ls /...
16
votes
1answer
1k views

Bash-like partial tab-complete for filenames in Vim

In Bash, when there are several files with the same prefix and I type part of the prefix and hit Tab, it completes the common prefix and allows me to continue typing to differentiate among the ...
0
votes
2answers
97 views

Tab behaviour between :o and :cd

When I use :cd command in gvim it allows to complete the directories with a simple Tab press. However with :o command I only get ^I. How can I migrate the same bahavior from :cd to :o?
5
votes
2answers
97 views

How can I go into a directory in filename completion?

Consider a directory structure like this: topdir/ file1 file2 foo/ bar1 bar2 Say I want to open some file in foo/ in a new tab. I would first write :tabe topdir/, and then keep hitting ...
38
votes
3answers
56k views

How to get intelligent C++ auto-completion

Some editors (such as visual studio on windows) do C++ autocompletion which understand C++. For example, given: #include <vector> int main(void) { std::vector<int> v; v.i In visual ...
63
votes
5answers
96k views

Is it possible to have vim auto-complete function names, variables, etc. when using it to program?

Many IDEs automatically complete function names, variables, method names, etc. as the user types. The best ones complete the names based both on the language's built-in library as well as what has ...

1 2 3 4 5
6