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
28
votes
3answers
6k views

How to create my own autocomplete function?

How do I create my own list of auto-completion for certain filetypes? For example I would like css and html to autocomplete from the list of css classes in FontAwesome.
5
votes
1answer
252 views

How do I complete a WORD? [duplicate]

I use the complete function a lot. I have not found a solution to complete a WORD yet. For example, in LaTeX, I use the following expression: T_{R_{delta}} If I type T and then Ctrl+xCtrl+n, it ...
11
votes
1answer
5k views

Vim filename/path completion

I know I can complete filenames/paths from the current directory using ctrl+x, ctrl+f (compl-filename). That works great in combination with set autochdir, which changes updates the current directory ...
4
votes
2answers
756 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 ...
5
votes
1answer
2k 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.
4
votes
1answer
242 views

How to autocomplete tag names containing a colon?

Sometimes I want to autocomplete a tag name containing a colon, for example g:netrw_gx. I've added to the 'tags' option the location of the tags file of the main documentation (which on my machine ...
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 ...
4
votes
2answers
252 views

How to get auto completion provided by <C-N> without typing <C-N>?

I like the simple auto completion provided by Ctrl-N but not typing Ctrl-N everytime to get the completion. I would like it to work similar to how YouCompleteMe works with automatic suggestions. If ...
1
vote
1answer
170 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 ...
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 ...
17
votes
1answer
845 views

Filename Completion for Remote Files

My friend showed me a cool trick on Emacs some days ago where he could just open a file on a remote server and I instantly thought "there should be a way to do that in vim too" and it was true. I ...
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 \...
8
votes
2answers
256 views

How can I make vim stop splitting my words into chunks?

English language users probably don't have this trouble, but vim is pretty dumb when it comes to regular expressions. In my case most letters in the Turkish alphabet outside the EN alphabet don't seem ...
8
votes
1answer
6k 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 ...
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><...
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 ...
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 ...
4
votes
1answer
90 views

How does ft-c-omni work and how can I make it faster?

As I was studying the various ways of doing completion in Vim 8.0, I came across the very interesting "omni-completion" feature and its 'omnifunc' option, which is specialized as ccomplete#...
2
votes
1answer
506 views

Autocomplete after serveral chars

I want to use the auto complete feature from vim (ctrln). How can I activate this feature automatically after I have entered e.g. 3 chars? Thank You
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 ...
8
votes
1answer
741 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, ...
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 ...
4
votes
1answer
1k views

When I press ctrl-p and autocomplete a word, is there a way to immediately jump into normal mode by pressing escape without canceling the selection?

I use ctrl-p (and SuperTab with it), quite often to do autocompletion. But what happens quite often is that I press tab to autocomplete, I get the match I want, and then I have to go into normal mode. ...
3
votes
2answers
289 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 ...
1
vote
2answers
328 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 ...
0
votes
0answers
84 views

vim-pandoc bibliography completion works only when writing a new file with GVim

I have installed vim-pandoc, as suggested here. When I open Vim in the terminal I get only 'Omni completion (^O^N^P) Pattern not found' errors. echo pandoc#bibliographies#Find_Bibliographies() returns ...
0
votes
1answer
337 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
0answers
340 views

How to (auto) complete filenames?

Developing in nodejs I have a lot of custom module require statements in my javascript source files, like this one: // // my nodejs program: // path/to/projecthome/lib/someModule.js // const EMOJI = ...